*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:"Cairo",Arial,sans-serif;background:#f5f8fd;color:#10213d}button,input{font:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:280px;background:linear-gradient(180deg,#071d43 0%,#0a2e5e 55%,#081b3b 100%);color:#fff;padding:18px 16px;position:fixed;right:0;top:0;bottom:0;overflow:auto;z-index:20}.brand{display:flex;align-items:center;gap:10px;padding:4px 2px 18px;border-bottom:1px solid #ffffff1c}.brand-mark{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#24b3ff,#246cff);display:grid;place-items:center;font-weight:800;font-size:28px}.brand strong,.brand span{display:block}.brand strong{font-size:22px;letter-spacing:.4px}.brand span{font-size:12px;color:#bcd8ff}.nav{display:grid;gap:6px;margin-top:18px}.nav-item{border:0;background:transparent;color:#eaf3ff;padding:12px 14px;border-radius:12px;text-align:right;cursor:pointer;font-weight:700;display:flex;align-items:center;gap:11px}.nav-item:hover,.nav-item.active{background:linear-gradient(90deg,#1677ff,#259dff);color:#fff}.premium-card{margin-top:24px;padding:18px;border-radius:18px;background:linear-gradient(180deg,#9b6b00,#543c00);border:1px solid #f6c945;text-align:center;box-shadow:0 10px 30px #0003}.premium-card h3{margin:6px 0}.premium-card p,.premium-card li{font-size:13px}.premium-card ul{text-align:right;line-height:1.9;padding-right:20px}.crown{font-size:32px;color:#ffd84d}.main{margin-right:280px;width:calc(100% - 280px);min-height:100vh}.topbar{height:78px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:10;border-bottom:1px solid #eaf0f8}.search-wrap{position:relative;width:min(560px,55vw)}.search-wrap input{width:100%;border:1px solid #dfe8f4;background:#f4f8fc;border-radius:13px;padding:13px 45px 13px 16px;outline:none}.search-icon{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:21px;color:#345}.top-actions{display:flex;align-items:center;gap:10px}.icon-btn{border:0;background:#f2f6fb;width:42px;height:42px;border-radius:12px;cursor:pointer;position:relative}.notif b{position:absolute;top:-5px;left:-4px;background:#f0293e;color:#fff;border-radius:999px;font-size:10px;padding:2px 6px}.profile-mini{border:0;background:transparent;display:flex;align-items:center;gap:9px;cursor:pointer;color:#10213d}.profile-mini small,.profile-mini strong{display:block;text-align:right}.avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#0d3e75,#178cff);color:#fff;font-weight:800}.avatar.large{width:74px;height:74px;font-size:26px}.page{display:none;padding:20px 26px}.active-page{display:block} .hero{min-height:170px;border-radius:22px;padding:18px 22px;display:grid;grid-template-columns:1fr .9fr;align-items:center;gap:14px;background:radial-gradient(circle at 80% 20%,#1686ff66,transparent 32%),linear-gradient(135deg,#061f4d,#063a85 60%,#0759b7);background-size:140% 140%,180% 180%;background-position:0% 0%,0% 50%;color:#fff;overflow:hidden;position:relative;animation:heroBlueFlow 12s ease-in-out infinite alternate;isolation:isolate}.hero:before{content:"";position:absolute;inset:auto -10% -14% -10%;height:52%;background:radial-gradient(120% 70% at 15% 100%,#ffffff2d 0%,transparent 48%),radial-gradient(110% 65% at 52% 100%,#59c7ff2c 0%,transparent 46%),radial-gradient(120% 70% at 88% 100%,#ffffff20 0%,transparent 44%),linear-gradient(180deg,transparent 0%,#7fdcff12 35%,#8ae8ff2b 70%,#b2f2ff2e 100%);filter:blur(8px);opacity:.95;transform-origin:center bottom;animation:heroWaveDrift 9s ease-in-out infinite;pointer-events:none;z-index:0}.hero:after{content:"";position:absolute;width:220px;height:220px;border-radius:50%;background:#27d2ff24;left:-70px;top:-70px;animation:heroOrbFloat 8s ease-in-out infinite;z-index:0}.eyebrow{color:#cfeaff;font-size:15px}.hero h1{font-size:30px;margin:2px 0 0;line-height:1.08}.hero h2{font-size:18px;margin:4px 0 6px;line-height:1.35}.hero p{max-width:680px;color:#d6e9ff;margin:0;font-size:13px;line-height:1.7}.hero-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.btn{border:0;border-radius:12px;padding:12px 20px;font-weight:800;cursor:pointer}.btn-primary{background:#fff;color:#1069e9}.btn-ghost{border:1px solid #ffffff70;background:#ffffff12;color:#fff}.btn-gold{width:100%;background:#ffd954;color:#3c2c00}.wide{width:100%;background:#1677ff;color:#fff}.hero-visual{position:relative;min-height:132px}.laptop{position:absolute;left:8px;bottom:0;width:220px;height:124px;background:#101a2b;border:8px solid #1b2f4e;border-radius:15px 15px 7px 7px;transform:perspective(700px) rotateY(8deg);box-shadow:0 20px 35px #0006}.screen{height:100%;display:grid;place-items:center;text-align:center;padding:10px;background:linear-gradient(135deg,#0c2f63,#0976d9);font-size:15px;font-weight:800}.floating-features{position:absolute;right:0;top:4px;display:grid;grid-template-columns:repeat(2,max-content);gap:6px}.floating-features span{padding:6px 10px;border:1px solid #66c8ff;background:#0e3f7ea8;border-radius:10px;font-size:12px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;margin-top:18px}.content-card{background:#fff;border:1px solid #e7edf6;border-radius:18px;padding:18px;box-shadow:0 8px 24px #1231520c}.section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}.section-head h3{margin:0;font-size:23px}.section-head p{margin:3px 0 0;color:#74839a}.section-head.compact h3{font-size:19px}.link-btn,.mini-link{border:0;background:transparent;color:#1677ff;font-weight:800;cursor:pointer}.services-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.service-card{border-radius:15px;padding:18px;text-align:center;min-height:170px;border:1px solid #eef2f7;transition:.25s}.service-card:hover{transform:translateY(-4px);box-shadow:0 12px 28px #12315218}.service-card h4{margin:8px 0 6px;font-size:16px}.service-card p{margin:0 0 7px;color:#526177;font-size:12px}.service-icon{font-size:29px;font-weight:800}.service-card.pdf{background:#fff0f3}.service-card.ai{background:#eef7ff}.service-card.admin{background:#effbf4}.service-card.school{background:#fff4eb}.service-card.docs{background:#f8efff}.service-card.images{background:#eef9f6}.service-card.tools{background:#fff8df}.service-card.community{background:#fff0f9}.right-column{display:grid;gap:20px;align-content:start}.account-user{display:flex;align-items:center;gap:12px}.account-user strong,.account-user span{display:block}.account-user span{font-size:13px;color:#708099}.status-row{display:flex;gap:6px;margin-top:6px}.badge{font-size:11px!important;padding:5px 8px;border-radius:999px}.badge.gold{background:#fff1c7;color:#9a6b00}.badge.green{background:#ddf8e7;color:#16944c}.expiry{margin-top:18px}.expiry span,.expiry small{font-size:12px;color:#5b6b83}.progress{height:9px;background:#edf2f8;border-radius:999px;margin:8px 0;overflow:hidden}.progress span{display:block;height:100%;background:linear-gradient(90deg,#21b854,#59d577);border-radius:999px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:13px}.stats div{background:#f6f9fd;border-radius:12px;padding:10px 5px;text-align:center}.stats strong,.stats span{display:block}.stats strong{font-size:20px;color:#1557b7}.stats span{font-size:10px;color:#65758d}.post{padding:12px 0;border-top:1px solid #edf1f6}.post:first-of-type{border-top:0}.post strong{display:block}.post small{color:#8492a6}.post p{font-size:13px;margin:7px 0}.post-meta{display:flex;gap:18px;color:#456}.articles{margin-top:20px}.articles-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.articles article{border:1px solid #e9eef5;border-radius:15px;overflow:hidden}.articles h4,.articles small{display:block;padding:0 13px}.articles h4{margin:12px 0 8px}.articles small{padding-bottom:13px;color:#7a889d}.article-cover{height:125px;display:grid;place-items:center;font-size:38px;font-weight:800;color:#fff}.ai-bg{background:linear-gradient(135deg,#0b2454,#1677ff)}.morocco-bg{background:linear-gradient(135deg,#b3261e,#e84a3f)}.pdf-bg{background:linear-gradient(135deg,#d91935,#ff667b)}.simple-page{min-height:600px;background:#fff;border:1px solid #e7edf6;border-radius:18px;padding:30px}.simple-page h1{margin-top:0}.placeholder-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:20px}.placeholder-card{background:#f5f8fc;border:1px solid #e4eaf2;border-radius:15px;padding:20px}footer{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:24px 26px;color:#65758a;font-size:12px}footer a{color:#53667f;text-decoration:none;margin-left:18px}.modal{position:fixed;inset:0;display:none;z-index:100}.modal.open{display:block}.modal-backdrop{position:absolute;inset:0;background:#06162dbf;backdrop-filter:blur(4px)}.modal-panel{position:relative;z-index:2;width:min(440px,calc(100% - 30px));margin:8vh auto;background:#fff;border-radius:20px;padding:24px;box-shadow:0 30px 80px #0006}.modal-close{position:absolute;left:15px;top:12px;border:0;background:#edf3fa;width:34px;height:34px;border-radius:50%;font-size:22px;cursor:pointer}.auth-tabs{display:flex;background:#f1f5fb;border-radius:12px;padding:5px;margin:25px 0 18px}.auth-tab{flex:1;border:0;background:transparent;padding:10px;border-radius:9px;font-weight:800;cursor:pointer}.auth-tab.active{background:#fff;color:#1677ff;box-shadow:0 3px 10px #0001}.auth-form{display:none}.auth-form.active-auth{display:grid;gap:14px}.auth-form label{display:grid;gap:6px;font-weight:700}.auth-form input{border:1px solid #dce5f0;border-radius:10px;padding:11px;outline:none}.hint{color:#7d8a9d;line-height:1.7}.toast{position:fixed;left:22px;bottom:22px;background:#10213d;color:#fff;padding:12px 18px;border-radius:12px;opacity:0;transform:translateY(15px);pointer-events:none;transition:.25s;z-index:150}.toast.show{opacity:1;transform:none}

@media (max-width:1200px){.services-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.right-column{grid-template-columns:1fr 1fr}.hero{grid-template-columns:1fr}.hero-visual{min-height:210px}.articles-grid{grid-template-columns:1fr 1fr}}
@media (max-width:900px){.sidebar{width:86px;padding:14px 8px}.brand>div:not(.brand-mark),.nav-item{font-size:0}.nav-item span{font-size:20px}.nav-item{justify-content:center}.premium-card{display:none}.main{margin-right:86px;width:calc(100% - 86px)}.topbar{padding:0 14px}.profile-mini>div:last-child{display:none}.hero h1{font-size:30px}.right-column{grid-template-columns:1fr}.articles-grid{grid-template-columns:1fr}.placeholder-grid{grid-template-columns:1fr}}
@media (max-width:620px){.page{padding:12px}.topbar{height:auto;gap:10px;padding:10px;flex-wrap:wrap}.search-wrap{width:100%;order:2}.hero{padding:22px}.hero h1{font-size:25px}.hero h2{font-size:20px}.hero-actions{flex-direction:column}.hero-visual{display:none}.services-grid{grid-template-columns:1fr}.sidebar{width:72px}.main{margin-right:72px;width:calc(100% - 72px)}footer{flex-direction:column;align-items:flex-start}.stats{grid-template-columns:1fr 1fr 1fr}}

.danger-btn{background:#ffe8ec;color:#c9253f}.danger-btn:hover{background:#ffd8df}

.admin-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:20px 0}
.admin-stat{background:#f6f9fd;border:1px solid #e3eaf4;border-radius:15px;padding:18px;text-align:center}
.admin-stat strong{display:block;font-size:28px;color:#1557b7}.admin-stat span{font-size:12px;color:#64748b}
.admin-toolbar{margin:16px 0}.admin-toolbar input{width:min(420px,100%);border:1px solid #dce5f0;border-radius:11px;padding:11px 13px}
.admin-table-wrap{overflow:auto;border:1px solid #e5ebf3;border-radius:14px;background:#fff}
.admin-table{width:100%;border-collapse:collapse;min-width:760px}.admin-table th,.admin-table td{padding:13px;border-bottom:1px solid #edf1f6;text-align:right;font-size:13px}
.admin-table th{background:#f7f9fc;color:#41526a}.admin-table tr:last-child td{border-bottom:0}
.status-pill{display:inline-block;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}
.status-active{background:#ddf8e7;color:#158a46}.status-suspended{background:#ffe4e8;color:#be263d}.status-expired{background:#fff1d9;color:#9a6300}
.admin-actions{display:flex;gap:6px;flex-wrap:wrap}.admin-actions button{border:0;border-radius:8px;padding:7px 9px;font-size:11px;font-weight:800;cursor:pointer}
.action-activate{background:#e6f0ff;color:#1766d1}.action-extend{background:#e7f8ec;color:#19894b}.action-suspend{background:#ffe7eb;color:#bd2940}.action-unsuspend{background:#fff4dc;color:#996200}
@media(max-width:900px){.admin-stats{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.admin-stats{grid-template-columns:1fr}}

/* PDF Tools V4 */
.pdf-title-row{align-items:flex-start}.privacy-chip{background:#e9f8ef;color:#147a43;padding:9px 12px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid #cdeed9;white-space:nowrap}
.pdf-tools-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0}
.pdf-tool-card{appearance:none;border:1px solid #e4eaf2;background:#fff;border-radius:16px;padding:19px;text-align:right;cursor:pointer;display:grid;grid-template-columns:52px 1fr;grid-template-rows:auto auto;column-gap:12px;transition:.2s;color:#10213d}
.pdf-tool-card:hover,.pdf-tool-card.active{transform:translateY(-3px);box-shadow:0 12px 30px #12315215;border-color:#9dc9ff}.pdf-tool-card strong{align-self:end;font-size:16px}.pdf-tool-card small{grid-column:2;color:#6e7d91;line-height:1.7}
.pdf-tool-icon{grid-row:1/3;width:52px;height:52px;border-radius:14px;display:grid;place-items:center;font-size:24px;font-weight:900}.pdf-tool-icon.red{background:#ffe8ec;color:#cf2440}.pdf-tool-icon.blue{background:#e7f2ff;color:#1667cf}.pdf-tool-icon.rose{background:#fff0f3;color:#d1445b}.pdf-tool-icon.green{background:#e8f8ee;color:#138849}.pdf-tool-icon.purple{background:#f3eaff;color:#7544c6}.pdf-tool-icon.orange{background:#fff0df;color:#c86b11}
.pdf-workspace{position:relative;margin-top:20px;border:1px solid #e3eaf3;border-radius:18px;background:#f9fbfe;padding:22px;min-height:310px}.pdf-workspace-empty{text-align:center;padding:42px 15px;color:#718096}.big-pdf{width:80px;height:80px;border-radius:20px;margin:0 auto 15px;background:#ffe4e9;color:#d82241;display:grid;place-items:center;font-weight:900;font-size:24px}.pdf-workspace-empty h3{margin:5px 0;color:#273750}.pdf-panel{display:none}.pdf-panel.active{display:block}.pdf-panel-head h2{margin:0 0 4px}.pdf-panel-head p{margin:0 0 18px;color:#6b7b91}
.dropzone{display:flex;align-items:center;justify-content:center;min-height:110px;border:2px dashed #a8bfd9;background:#fff;border-radius:16px;font-weight:800;color:#2a5f99;cursor:pointer;padding:20px;text-align:center}.dropzone:hover{background:#f3f8ff}.dropzone input{display:none}.selected-files{display:grid;gap:7px;margin:12px 0}.selected-file{display:flex;justify-content:space-between;gap:12px;background:#fff;border:1px solid #e4eaf2;border-radius:10px;padding:9px 11px;font-size:12px}.selected-file span:last-child{color:#728197}
.pdf-field{display:grid;gap:7px;margin:15px 0;font-weight:800;color:#31445e}.pdf-field input,.pdf-field select{border:1px solid #d9e2ed;border-radius:11px;padding:11px 12px;background:#fff;outline:none}.pdf-field input:focus,.pdf-field select:focus{border-color:#64a8f5;box-shadow:0 0 0 3px #dcecff}.pdf-two-cols{display:grid;grid-template-columns:1fr 220px;gap:14px}.pdf-action-btn{background:#1677ff;color:#fff;margin-top:6px}.pdf-action-btn:disabled{opacity:.55;cursor:not-allowed}.pdf-status{display:none;margin-top:14px;padding:11px 13px;border-radius:11px;font-size:13px;font-weight:700}.pdf-status.show{display:block}.pdf-status.info{background:#eaf4ff;color:#1b62a9}.pdf-status.success{background:#e7f8ed;color:#187844}.pdf-status.error{background:#ffe8ec;color:#b7293d}
@media(max-width:1000px){.pdf-tools-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.pdf-tools-grid{grid-template-columns:1fr}.pdf-two-cols{grid-template-columns:1fr}.privacy-chip{white-space:normal}.pdf-tool-card{grid-template-columns:46px 1fr}.pdf-tool-icon{width:46px;height:46px}}

.pdf-tool-card[data-pdf-tool="jpg"]{background:linear-gradient(180deg,#eef7ff,#ffffff)}
.pdf-tool-card[data-pdf-tool="number"]{background:linear-gradient(180deg,#effbf4,#ffffff)}
.pdf-tool-card[data-pdf-tool="watermark"]{background:linear-gradient(180deg,#f8efff,#ffffff)}
.pdf-tool-card[data-pdf-tool="compress"]{background:linear-gradient(180deg,#fff0f3,#ffffff)}

.ai-page{background:transparent;border:0;padding:0;min-height:700px}
.ai-secure-badge{background:#e9f8ef;color:#147746;border:1px solid #caecd7;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}
.ai-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.85fr);gap:18px;align-items:start}
.ai-form-card,.ai-result-card,.ai-examples{background:#fff;border:1px solid #e4ebf4;border-radius:18px;padding:20px;box-shadow:0 8px 24px #1231520c}
.ai-form-card h2,.ai-result-card h2,.ai-examples h2{margin-top:0}
.ai-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.ai-form-card .pdf-field,.ai-result-card .pdf-field{margin-bottom:13px}
.ai-form-card textarea,.ai-result-card textarea,.ai-form-card input,.ai-form-card select{
  width:100%;border:1px solid #dce5f0;border-radius:11px;padding:11px 12px;background:#fff;color:#10213d;outline:none
}
.ai-form-card textarea:focus,.ai-result-card textarea:focus,.ai-form-card input:focus,.ai-form-card select:focus{border-color:#4a91ff;box-shadow:0 0 0 3px #4a91ff18}
.ai-form-actions{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin-top:8px}
.ai-form-actions small{color:#74839a}
.ai-generate-btn{background:linear-gradient(135deg,#155fd6,#5a47dc);color:#fff;padding:13px 20px}
.ai-generate-btn:disabled{opacity:.6;cursor:not-allowed}
.ai-result-head{display:flex;justify-content:space-between;gap:12px;align-items:start}
.ai-result-head p{margin-top:-8px;color:#74839a;font-size:12px}
.ai-result-card textarea{width:100%;resize:vertical;line-height:1.9;min-height:430px;font-family:"Cairo",Arial,sans-serif}
.ai-status{padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}
.ai-status.idle{background:#eef3f8;color:#5d6b7d}.ai-status.loading{background:#fff3cf;color:#896000}.ai-status.success{background:#ddf8e7;color:#168044}.ai-status.error{background:#ffe4e8;color:#bd2940}
.ai-result-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
.ai-secondary-btn{background:#eef5ff;color:#1767d2}.ai-clear-btn{background:#f4f5f7;color:#5b6470}
.ai-examples{margin-top:18px}
.ai-example-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.ai-example{border:1px solid #e5eaf1;background:#f8fafc;border-radius:13px;padding:14px;text-align:right;font-weight:700;cursor:pointer;color:#21324a}
.ai-example:hover{border-color:#8bb8ff;background:#f1f7ff}
@media(max-width:1100px){.ai-layout{grid-template-columns:1fr}.ai-example-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.ai-grid{grid-template-columns:1fr}.ai-example-grid{grid-template-columns:1fr}.ai-secure-badge{display:none}}

.ai-export-document{
  position:fixed;left:-10000px;top:0;width:794px;min-height:1123px;background:#fff;color:#111;
  padding:70px 64px 60px;font-family:"Cairo",Arial,sans-serif;direction:rtl;text-align:right
}
.ai-export-header{border-bottom:2px solid #163f75;padding-bottom:14px;margin-bottom:30px}
.ai-export-brand{font-size:20px;font-weight:800;color:#163f75;letter-spacing:.2px}
.ai-export-sub{font-size:11px;color:#6b7280;margin-top:4px}
.ai-export-body{white-space:pre-wrap;line-height:2;font-size:16px;word-break:break-word}
@media print{
  body *{visibility:hidden!important}
  #aiExportDocument,#aiExportDocument *{visibility:visible!important}
  #aiExportDocument{position:absolute!important;left:0!important;top:0!important;width:100%!important;min-height:auto!important;padding:20mm!important}
}

.morocco-services-page{background:transparent;border:0;padding:0}
.official-badge{background:#e9f8ef;color:#147746;border:1px solid #ccebd7;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}
.admin-service-search{margin:18px 0 12px}
.admin-service-search input{width:100%;background:#fff;border:1px solid #dce5f0;border-radius:13px;padding:13px 15px;outline:none}
.admin-service-search input:focus{border-color:#4a91ff;box-shadow:0 0 0 3px #4a91ff18}
.admin-category-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.admin-cat{border:1px solid #dfe7f1;background:#fff;color:#43546b;padding:8px 13px;border-radius:999px;font-weight:800;cursor:pointer}
.admin-cat.active,.admin-cat:hover{background:#1677ff;color:#fff;border-color:#1677ff}
.official-services-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.official-service-card{background:#fff;border:1px solid #e5ebf4;border-radius:17px;padding:17px;display:flex;gap:13px;min-height:190px;box-shadow:0 8px 22px #1231520b;transition:.2s}
.official-service-card:hover{transform:translateY(-3px);box-shadow:0 13px 30px #12315216}
.official-service-icon{width:52px;height:52px;flex:0 0 52px;border-radius:15px;display:grid;place-items:center;font-size:25px}
.official-service-icon.red{background:#fff0f3}.official-service-icon.blue{background:#edf6ff}
.official-service-icon.orange{background:#fff3e8}.official-service-icon.purple{background:#f6efff}
.official-service-icon.green{background:#ecfaf1}.official-service-icon.cyan{background:#eafaff}
.official-service-body{display:flex;flex-direction:column;min-width:0}
.source-label{font-size:10px;color:#718096;font-weight:700}
.official-service-card h3{margin:4px 0 6px;font-size:18px}
.official-service-card p{margin:0;color:#65758b;font-size:12px;line-height:1.8}
.official-service-actions{margin-top:auto;padding-top:12px}
.official-service-actions a{display:inline-block;text-decoration:none;background:#eef5ff;color:#1265d4;padding:8px 11px;border-radius:9px;font-size:12px;font-weight:800}
.official-note{margin-top:18px;background:#fff8df;border:1px solid #f4df96;border-radius:14px;padding:14px;color:#68561e;font-size:12px;line-height:1.8}
@media(max-width:1100px){.official-services-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.official-services-grid{grid-template-columns:1fr}.official-service-card{min-height:auto}}

.templates-page{background:transparent;border:0;padding:0}
.templates-badge{background:#f2ecff;color:#6b42bf;border:1px solid #e0d4ff;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}
.templates-toolbar{display:grid;grid-template-columns:1fr 180px;gap:10px;margin:18px 0 12px}
.templates-toolbar input,.templates-toolbar select{border:1px solid #dce5f0;background:#fff;border-radius:12px;padding:12px 13px;outline:none}
.templates-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.template-tab{border:1px solid #dfe7f1;background:#fff;color:#43546b;padding:8px 13px;border-radius:999px;font-weight:800;cursor:pointer}
.template-tab.active,.template-tab:hover{background:#6b4bd8;color:#fff;border-color:#6b4bd8}
.templates-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.template-card{background:#fff;border:1px solid #e5ebf4;border-radius:16px;padding:16px;display:flex;gap:12px;min-height:170px;box-shadow:0 8px 22px #1231520b}
.template-icon{width:48px;height:48px;flex:0 0 48px;border-radius:14px;background:#f4efff;display:grid;place-items:center;font-size:24px}
.template-info{display:flex;flex-direction:column;min-width:0}
.template-info span{font-size:10px;color:#7b8798}
.template-info h3{margin:5px 0 6px;font-size:16px}
.template-info p{margin:0;color:#64748b;font-size:12px;line-height:1.7}
.template-open-btn{margin-top:auto;border:0;background:#f0ebff;color:#6945cc;padding:8px 10px;border-radius:9px;font-weight:800;cursor:pointer;text-align:center}
.template-editor-card{margin-top:18px;background:#fff;border:1px solid #e5ebf4;border-radius:18px;padding:20px}
.template-editor-head{display:flex;justify-content:space-between;align-items:start;gap:12px}
.template-editor-head h2{margin:0}.template-editor-head p{margin:4px 0 0;color:#74839a}
.editor-lang-badge{padding:6px 10px;border-radius:999px;background:#eef3f8;color:#5c6878;font-size:11px;font-weight:800}
.template-editor-card textarea{width:100%;margin-top:14px;border:1px solid #dce5f0;border-radius:12px;padding:14px;line-height:2;resize:vertical;font-family:"Cairo",Arial,sans-serif;min-height:420px}
.template-editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
@media(max-width:1200px){.templates-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.templates-grid{grid-template-columns:1fr}.templates-toolbar{grid-template-columns:1fr}}

.school-page{background:transparent;border:0;padding:0}
.school-badge{background:#eaf6ff;color:#1767a8;border:1px solid #cfe8fb;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}
.school-toolbar{display:grid;grid-template-columns:1fr 180px 190px;gap:10px;margin:18px 0}
.school-toolbar input,.school-toolbar select{border:1px solid #dce5f0;background:#fff;border-radius:12px;padding:12px 13px;outline:none}
.school-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.school-card{background:#fff;border:1px solid #e5ebf4;border-radius:16px;padding:16px;min-height:210px;display:flex;flex-direction:column;box-shadow:0 8px 22px #1231520b}
.school-icon{width:48px;height:48px;border-radius:14px;background:#eef7ff;display:grid;place-items:center;font-size:24px;margin-bottom:10px}
.school-card>span{font-size:10px;color:#7a8799}.school-card h3{font-size:16px;margin:5px 0 6px}.school-card p{font-size:12px;color:#65758b;line-height:1.7;margin:0}
.school-open-btn{margin-top:auto;border:0;background:#eaf4ff;color:#1767d2;padding:8px 10px;border-radius:9px;font-weight:800;cursor:pointer}
.school-editor-card{margin-top:18px;background:#fff;border:1px solid #e5ebf4;border-radius:18px;padding:20px}
.school-editor-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.school-editor-head h2{margin:0}.school-editor-head p{margin:4px 0 0;color:#74839a}
.school-meta-badge{padding:6px 10px;border-radius:999px;background:#eef3f8;color:#5c6878;font-size:11px;font-weight:800}
.school-editor-card textarea{width:100%;margin-top:14px;border:1px solid #dce5f0;border-radius:12px;padding:14px;line-height:2;resize:vertical;font-family:"Cairo",Arial,sans-serif;min-height:460px}
.school-editor-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
@media(max-width:1200px){.school-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:750px){.school-grid{grid-template-columns:1fr}.school-toolbar{grid-template-columns:1fr}}

/* =========================
   LIVE SCHOOL WEB RESEARCH - V12
   ========================= */
.school-live-page{background:transparent;border:0;padding:0}
.school-live-badge{background:#e7f7ff;color:#0f6e9d;border:1px solid #c8eaf8;padding:8px 12px;border-radius:999px;font-size:12px;font-weight:800}
.school-search-box{background:linear-gradient(135deg,#f7fbff,#ffffff);border:1px solid #dfeaf5;border-radius:18px;padding:18px;margin:18px 0}
.school-live-grid{display:grid;grid-template-columns:minmax(260px,1.7fr) repeat(3,minmax(130px,.7fr));gap:12px}
.school-live-grid input,.school-live-grid select{width:100%;border:1px solid #dce5f0;border-radius:11px;padding:11px 12px;background:#fff;outline:none}
.school-live-grid input:focus,.school-live-grid select:focus{border-color:#4a91ff;box-shadow:0 0 0 3px #4a91ff18}
.school-live-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:14px}
.school-search-btn{background:linear-gradient(135deg,#1576e8,#19a5df);color:#fff}
.school-web-btn{background:#eef6ff;color:#1767d2}
.school-live-status{padding:7px 10px;border-radius:999px;font-size:11px;font-weight:800}
.school-live-status.idle{background:#edf2f7;color:#64748b}
.school-live-status.loading{background:#fff0c7;color:#8c6200}
.school-live-status.success{background:#dcf8e7;color:#158147}
.school-live-status.error{background:#ffe4e8;color:#bd2940}
.school-suggestions{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-top:13px}
.school-suggestions>span{font-size:11px;color:#718096;font-weight:800}
.school-suggestions button{border:1px solid #dce5f0;background:#fff;color:#43546b;padding:6px 9px;border-radius:999px;font-size:11px;cursor:pointer}
.school-suggestions button:hover{border-color:#88b8ff;background:#f2f7ff}
.school-live-layout{display:grid;grid-template-columns:minmax(320px,.8fr) minmax(0,1.2fr);gap:16px;align-items:start}
.school-sources-panel,.school-draft-panel{background:#fff;border:1px solid #e5ebf4;border-radius:18px;padding:18px;box-shadow:0 8px 22px #1231520b}
.school-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:13px}
.school-panel-head h2{margin:0;font-size:20px}.school-panel-head p{margin:4px 0 0;color:#74839a;font-size:12px}
#schoolSourcesCount{background:#eef3f8;color:#607085;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800;white-space:nowrap}
.school-sources-list{display:grid;gap:10px;max-height:720px;overflow:auto;padding-left:2px}
.school-source-card{border:1px solid #e4ebf4;border-radius:14px;padding:13px;background:#fbfdff}
.school-source-card h3{margin:0 0 5px;font-size:15px}
.school-source-card p{margin:0;color:#607087;font-size:11px;line-height:1.75}
.school-source-meta{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:9px}
.school-source-meta span{font-size:10px;color:#8995a5}
.school-source-meta a{font-size:11px;font-weight:800;color:#1767d2;text-decoration:none}
.school-empty-state{text-align:center;padding:45px 14px;color:#728096}
.school-empty-state>div{font-size:42px;margin-bottom:10px}.school-empty-state strong{display:block;color:#405169}.school-empty-state p{font-size:12px}
.school-draft-panel textarea{width:100%;min-height:620px;border:1px solid #dce5f0;border-radius:12px;padding:15px;line-height:2;resize:vertical;font-family:"Cairo",Arial,sans-serif}
.school-live-note{margin-top:16px;background:#fff8df;border:1px solid #f1df9d;border-radius:14px;padding:13px;color:#675820;font-size:12px;line-height:1.8}
@media(max-width:1150px){.school-live-grid{grid-template-columns:1fr 1fr}.school-live-layout{grid-template-columns:1fr}}
@media(max-width:680px){.school-live-grid{grid-template-columns:1fr}.school-live-actions{align-items:stretch}.school-live-actions .btn{width:100%}.school-panel-head{flex-direction:column}}

/* =========================
   LIVE IMAGE SEARCH - V14
   ========================= */
.images-studio-page{display:grid;gap:16px}
.images-top-strip{background:#071a43;color:#fff;border-radius:16px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 10px 24px #081b3b18}
.images-back-btn{border:0;background:transparent;color:#cfe1ff;font-weight:800;cursor:pointer}
.images-studio-card{background:#fff;border:1px solid #e7edf6;border-radius:24px;padding:18px;box-shadow:0 10px 30px #1231520b}
.images-studio-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px}
.images-title-wrap{display:flex;align-items:center;gap:14px}.images-title-wrap h1{margin:0 0 4px;font-size:25px}.images-title-wrap p{margin:0;color:#7a879b;font-size:13px}
.images-page-icon{width:54px;height:54px;border-radius:16px;background:#eef4ff;display:grid;place-items:center;font-size:28px;color:#1d4ed8}
.images-search-toolbar{display:grid;grid-template-columns:120px 130px minmax(0,1fr);gap:10px;align-items:center;margin:10px 0 12px}
.images-search-input-wrap{position:relative}.images-search-input-wrap input{width:100%;border:1px solid #dce5f0;background:#f5f8fc;border-radius:14px;padding:14px 48px 14px 16px;outline:none}.images-search-input-wrap span{position:absolute;right:15px;top:50%;transform:translateY(-50%);font-size:20px;color:#5f6f86}
.images-search-input-wrap input:focus{border-color:#9bb4ff;box-shadow:0 0 0 3px #1d4ed814}
.images-search-btn{background:#091f63;color:#fff}
.images-upload-btn{background:#c8f1eb;color:#0c5f64}
.images-toolbar-subrow{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid #edf2f8;padding-bottom:14px}
.images-recent-chips{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.chip-label{font-size:11px;color:#8b98ab;font-weight:800}
.images-recent-chips button{border:1px solid #e1e7ef;background:#f7f9fc;color:#55657c;padding:6px 10px;border-radius:999px;font-size:11px;cursor:pointer}
.images-recent-chips button:hover{background:#eef4ff;border-color:#cbd8ec}
.images-toolbar-options{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.images-inline-option{display:flex;align-items:center;gap:8px;font-size:12px;color:#617187;font-weight:700}.images-inline-option select{border:1px solid #dbe3ee;border-radius:10px;padding:8px 10px;background:#fff}
.images-link-btn{border:1px solid #dbe3ee;background:#fff;color:#506079;padding:8px 12px;border-radius:11px;cursor:pointer;font-weight:800}
.images-live-status{padding:7px 10px;border-radius:999px;font-size:11px;font-weight:800}
.images-live-status.idle{background:#edf2f7;color:#64748b}.images-live-status.loading{background:#fff0c7;color:#8c6200}.images-live-status.success{background:#dcf8e7;color:#158147}.images-live-status.error{background:#ffe4e8;color:#bd2940}
.images-workspace{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:16px;margin-top:16px}
.images-canvas-card{background:#fbfcfe;border:1px solid #e7edf6;border-radius:22px;padding:16px;min-width:0}
.selected-images-canvas{min-height:180px;border:1px dashed #d8e0eb;border-radius:18px;background:#fff;padding:14px;display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:12px;align-items:start}
.selected-images-empty{grid-column:1/-1;min-height:150px;display:grid;place-items:center;text-align:center;color:#96a2b3;gap:6px}.selected-images-empty strong{color:#66758d}.selected-images-empty p{margin:0;font-size:12px}.empty-icon{font-size:30px;opacity:.55}
.selected-image-card{position:relative;background:#fff;border:1px solid #e4eaf3;border-radius:14px;overflow:hidden;box-shadow:0 8px 20px #12315208}.selected-image-card img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;background:#eef2f7}.selected-image-card .selected-meta{padding:8px}.selected-image-card .selected-meta strong{display:block;font-size:11px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-image-card .selected-meta small{display:block;color:#8190a4;font-size:10px;margin-top:2px}
.selected-remove-btn{position:absolute;top:7px;left:7px;border:0;background:#fff;color:#cb2341;width:28px;height:28px;border-radius:999px;cursor:pointer;box-shadow:0 3px 10px #0002;font-weight:800}
.images-results-inline-head{margin-top:16px}.images-results-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:0 0 12px}.images-results-head h2{margin:0;font-size:20px}.images-results-head p{margin:4px 0 0;color:#74839a;font-size:12px}
#imagesResultsCount{background:#eef3f8;color:#607085;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800;white-space:nowrap}
.live-images-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.image-result-card{background:#fff;border:1px solid #e5ebf4;border-radius:18px;overflow:hidden;box-shadow:0 8px 22px #1231520b;display:flex;flex-direction:column;min-width:0}
.image-result-thumb{aspect-ratio:4/3;background:#eef2f7;display:flex;align-items:center;justify-content:center;overflow:hidden}.image-result-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}.image-result-card:hover .image-result-thumb img{transform:scale(1.035)}
.image-result-body{padding:12px;display:flex;flex-direction:column;gap:7px;flex:1}.image-result-body h3{font-size:13px;line-height:1.55;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.image-license{font-size:10px;color:#6f7d90;background:#f3f6fa;border-radius:8px;padding:5px 7px;align-self:flex-start}
.image-result-body small{color:#7f8ca1;font-size:10px;line-height:1.5}
.image-result-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto;padding-top:4px}.image-result-actions a,.image-result-actions button{border:0;text-decoration:none;background:#f0ebff;color:#6843c2;padding:7px 9px;border-radius:9px;font-size:10px;font-weight:800;cursor:pointer;font-family:inherit}.image-result-actions .image-open-original{background:#eef6ff;color:#1767d2}.image-result-actions .image-select-btn{background:#091f63;color:#fff}.image-result-actions .image-select-btn.active{background:#e9f8ee;color:#158147}
.images-empty-state{grid-column:1/-1;text-align:center;padding:70px 18px;background:#fff;border:1px dashed #dbe3ee;border-radius:18px;color:#728096}.images-empty-state>div{font-size:48px;margin-bottom:10px}.images-empty-state strong{display:block;color:#405169}.images-empty-state p{font-size:12px}
.images-side-panel{display:grid;gap:12px;align-content:start}.images-side-box{background:#fbfcfe;border:1px solid #e7edf6;border-radius:18px;padding:14px}.images-side-title strong{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:15px}.images-side-title small{display:block;color:#8090a5;font-size:11px;margin-top:6px}
.images-panel-field{display:grid;gap:7px;margin-bottom:14px;font-size:12px;color:#63728a;font-weight:700}.images-panel-field:last-child{margin-bottom:0}.images-panel-field select{border:1px solid #dbe3ee;border-radius:11px;padding:10px;background:#fff}
.images-segmented{display:flex;gap:8px}.images-segmented button{flex:1;border:1px solid #dbe3ee;background:#fff;color:#65758a;border-radius:10px;padding:9px 8px;cursor:pointer;font-weight:800}.images-segmented button.active{background:#eef4ff;color:#1d4ed8;border-color:#bdd0ff}
.images-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;color:#63728a;font-weight:700}.images-toggle-row input{width:18px;height:18px}
.images-side-actions .btn{width:100%;transition:.2s transform,.2s box-shadow,.2s background}.images-download-btn{background:#bdbdbd;color:#fff}.images-save-btn{margin-top:10px;background:#d0d0d0;color:#fff}.images-download-btn.is-ready{background:#1767d2;box-shadow:0 8px 18px rgba(23,103,210,.18)}.images-save-btn.is-ready{background:#168a55;box-shadow:0 8px 18px rgba(22,138,85,.18)}.images-download-btn.is-ready:hover,.images-save-btn.is-ready:hover{transform:translateY(-1px)}.images-download-btn.is-busy,.images-save-btn.is-busy{opacity:.8;cursor:wait}.images-clear-btn{border:0;background:transparent;color:#8c96a7;cursor:pointer;font-weight:800;width:100%;padding-top:10px}
.images-download-btn:disabled,.images-save-btn:disabled{cursor:not-allowed;opacity:.75;box-shadow:none;transform:none}
.images-live-note{margin-top:16px;background:#fff8df;border:1px solid #f1df9d;border-radius:14px;padding:13px;color:#675820;font-size:12px;line-height:1.8}
@media(max-width:1200px){.images-workspace{grid-template-columns:1fr}.live-images-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.images-search-toolbar{grid-template-columns:1fr}.live-images-grid{grid-template-columns:1fr}.images-toolbar-subrow{align-items:stretch}.images-toolbar-options{justify-content:space-between}.selected-images-canvas{grid-template-columns:repeat(2,minmax(0,1fr))}}


#imagesPerPageSelect{min-width:100%;}

/* Public Writer uploaded library - V17 */
.public-writer-library{margin:18px 0 28px;padding:18px;background:linear-gradient(135deg,#f7fbff,#fff);border:1px solid #dfe9f5;border-radius:20px}
.public-writer-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.public-writer-library-head h2{margin:7px 0 3px;font-size:22px}.public-writer-library-head p{margin:0;color:#718096;font-size:12px;line-height:1.8}
.public-writer-badge{display:inline-block;background:#eaf3ff;color:#1556a8;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800}
.public-writer-count{background:#0d2b61;color:#fff;border-radius:12px;padding:9px 12px;white-space:nowrap;font-size:12px}
.uploaded-template-card{min-height:185px}.uploaded-template-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto}
.uploaded-template-actions .template-open-btn{display:inline-block;text-decoration:none;margin-top:0}
.template-download-btn{display:inline-block;text-decoration:none;border:0;background:#e9f7ee;color:#148047;padding:8px 10px;border-radius:9px;font-weight:800;font-size:12px}
@media(max-width:700px){.public-writer-library-head{flex-direction:column}.public-writer-count{align-self:flex-start}}

.template-edit-btn{display:inline-block;border:0;background:#0d2b61;color:#fff;padding:8px 12px;border-radius:9px;font-weight:800;font-size:12px;cursor:pointer;font-family:inherit}
.template-edit-btn:hover{background:#16458d}
.template-word-save-btn{background:#1f7a4d;color:#fff}
.template-editor-note{margin:10px 0 0;color:#76859a;font-size:11px;line-height:1.7}


/* Professional public-writer layout - V20 */
.professional-writer-page{background:transparent;border:0;padding:0}
.writer-section-head{margin-bottom:16px}
.writer-studio-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:18px;align-items:start;direction:ltr}
.writer-studio-layout>section,.writer-studio-layout>aside{direction:rtl}
.writer-main-panel{background:linear-gradient(180deg,#f8fbff 0%,#eef3f8 100%);border:1px solid #dfe8f2;border-radius:24px;padding:18px;box-shadow:0 12px 35px #102a430d}
.writer-main-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px}
.writer-main-head h2{margin:8px 0 4px;font-size:24px;color:#102a43}.writer-main-head p{margin:0;color:#6b7c93;font-size:13px}
.writer-mini-badge{display:inline-block;background:#eef4ff;color:#1d4ed8;border:1px solid #ccdbff;padding:7px 12px;border-radius:999px;font-size:11px;font-weight:800}
.writer-head-badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.writer-soft-badge{padding:6px 10px;border-radius:999px;background:#f2f4f8;color:#5f6c7b;font-size:11px;font-weight:800}
.writer-paper-shell{background:#e9eef5;border:1px solid #d8e1ed;border-radius:22px;padding:18px}
.writer-paper{background:#fff;border:1px solid #dde5ef;border-radius:10px;min-height:920px;padding:42px 54px 50px;box-shadow:0 20px 40px #102a4310;display:flex;flex-direction:column}
.writer-paper-meta{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:28px;font-size:13px;color:#5f6c7b}
.writer-paper-meta-item{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.writer-paper-meta-item strong{background:#edf2f7;color:#243b53;padding:8px 12px;border-radius:10px;font-size:13px}
.writer-paper-title{text-align:center;margin:12px 0 28px;font-size:30px;color:#102a43;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.template-editor-paper{flex:1;min-height:620px;outline:none;border:0;background:transparent;white-space:pre-wrap;line-height:2.2;font-size:22px;color:#243b53;text-align:right;direction:rtl}
.template-editor-paper:empty:before{content:attr(data-placeholder);color:#9aa5b1}
.writer-actions-bar{margin-top:14px}.writer-actions-bar .btn{border-radius:12px}
.writer-sidebar{background:#fff;border:1px solid #dfe7f1;border-radius:22px;padding:18px;box-shadow:0 12px 30px #102a430d;position:sticky;top:16px;max-height:calc(100vh - 32px);overflow:hidden;display:flex;flex-direction:column;gap:12px}
.writer-sidebar-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.writer-sidebar-head h3{margin:0 0 4px;font-size:26px;color:#102a43}.writer-sidebar-head p{margin:0;color:#7b8798;font-size:12px;line-height:1.8}
.writer-sidebar-toolbar{grid-template-columns:1fr;gap:9px;margin:0}.writer-sidebar-toolbar input,.writer-sidebar-toolbar select{background:#f8fafc}
.writer-ai-btn{background:#22364d;color:#fff;width:100%;justify-content:center}
.writer-sidebar-tabs{margin:0 0 2px;max-height:118px;overflow:auto;padding-left:2px}
.writer-sidebar-section{min-height:0;display:flex;flex-direction:column;gap:10px;overflow:hidden}
.writer-sidebar-label{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding-bottom:8px;border-bottom:1px solid #edf2f7}
.public-writer-sidebar-list{display:grid;gap:10px;overflow:auto;padding-left:2px}
.writer-doc-item{min-height:auto;padding:12px;border-radius:14px;box-shadow:none;gap:10px;border-color:#e6edf5;background:#fbfdff}
.writer-doc-item .template-icon{width:40px;height:40px;flex:0 0 40px;font-size:20px;border-radius:12px}
.writer-doc-item .template-info span{font-size:10px}.writer-doc-item .template-info h3{font-size:14px;margin:2px 0 4px;line-height:1.6}.writer-doc-item .template-info p{font-size:11px;line-height:1.6}
.writer-doc-item .uploaded-template-actions{gap:6px;margin-top:8px}.writer-doc-item .template-open-btn,.writer-doc-item .template-download-btn,.writer-doc-item .template-edit-btn{padding:7px 9px;font-size:11px;border-radius:8px}
.quick-templates-panel{margin-top:22px;background:#fff;border:1px solid #e5ebf4;border-radius:22px;padding:18px;box-shadow:0 10px 24px #1231520b}
.quick-templates-head{margin-bottom:12px}
.quick-templates-grid .template-card{min-height:155px}
@media(max-width:1250px){.writer-studio-layout{grid-template-columns:1fr}.writer-sidebar{position:relative;top:auto;max-height:none}.writer-paper{min-height:780px;padding:32px 30px 38px}.template-editor-paper{font-size:18px;min-height:500px}}
@media(max-width:700px){.writer-main-head,.writer-sidebar-head,.writer-paper-meta{flex-direction:column}.writer-paper-title{font-size:24px}.writer-paper{padding:24px 18px 28px}.template-editor-paper{font-size:17px;line-height:2}.writer-actions-bar{display:grid;grid-template-columns:1fr 1fr}.writer-actions-bar .btn{width:100%}}


/* AI → Professional Writer bridge - V21 */
.ai-open-writer-btn{background:linear-gradient(135deg,#0d2b61,#1767d2);color:#fff;box-shadow:0 8px 18px #1767d228;border:0}
.ai-open-writer-btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 10px 22px #1767d238}
.ai-open-writer-btn:disabled{background:#d7dee8;color:#8c98a8;box-shadow:none;cursor:not-allowed}


/* Home promotional video - V23 */
.home-promo-video{margin-top:20px;background:#fff;border:1px solid #e2eaf4;border-radius:22px;padding:16px;box-shadow:0 10px 30px #12315210;overflow:hidden}
.promo-video-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:13px}
.promo-video-head h3{margin:5px 0 2px;font-size:22px;color:#10213d}.promo-video-head p{margin:0;color:#74839a;font-size:12px}
.promo-ad-badge{display:inline-block;background:#eef4ff;color:#1767d2;border:1px solid #d4e2ff;padding:5px 10px;border-radius:999px;font-size:10px;font-weight:800}
.promo-sound-btn{border:1px solid #dce5f0;background:#f7f9fc;color:#31445f;padding:9px 13px;border-radius:11px;cursor:pointer;font-weight:800;white-space:nowrap}
.promo-sound-btn:hover{background:#eef4ff;border-color:#bfd2f8}
.promo-video-frame{position:relative;border-radius:18px;overflow:hidden;background:#071d43;aspect-ratio:16/9;box-shadow:0 14px 32px #061a3b22}
.promo-video-frame video{width:100%;height:100%;object-fit:cover;display:block}
.promo-video-overlay{position:absolute;inset:auto 0 0 0;display:flex;justify-content:space-between;align-items:flex-end;gap:18px;padding:54px 20px 18px;background:linear-gradient(180deg,transparent 0%,#06172bd9 78%);color:#fff;pointer-events:none}
.promo-video-overlay>div{display:grid;gap:3px}.promo-video-overlay strong{font-size:18px}.promo-video-overlay span{font-size:12px;color:#dceaff}
.promo-cta-btn{background:#fff;color:#1069e9;pointer-events:auto;padding:10px 16px;border-radius:11px;white-space:nowrap}
@media(max-width:700px){.promo-video-head{align-items:flex-start;flex-direction:column}.promo-sound-btn{width:100%}.promo-video-overlay{padding:42px 12px 12px;align-items:stretch;flex-direction:column}.promo-video-overlay strong{font-size:15px}.promo-video-overlay span{font-size:10px}.promo-cta-btn{width:100%}}

/* Compact topbar promotional video - V24 */
.topbar{gap:16px}
.topbar-promo{height:56px;min-width:265px;max-width:310px;display:flex;align-items:center;gap:9px;background:linear-gradient(135deg,#071d43,#0d4f9d);border:1px solid #1e65b3;border-radius:14px;padding:5px 8px;color:#fff;box-shadow:0 6px 18px #0b2f5d1f;overflow:hidden}
.topbar-promo-video{position:relative;width:92px;height:46px;flex:0 0 92px;border:0;border-radius:10px;overflow:hidden;padding:0;background:#06172b;cursor:pointer}
.topbar-promo-video video{width:100%;height:100%;object-fit:cover;display:block}
.topbar-ad-badge{position:absolute;top:4px;right:4px;background:#e63946;color:#fff;border-radius:999px;padding:2px 6px;font-size:8px;font-weight:800;line-height:1.4}
.topbar-promo-copy{min-width:0;display:flex;flex-direction:column;line-height:1.35;flex:1}
.topbar-promo-copy strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-promo-copy small{font-size:9px;color:#cfe5ff;white-space:nowrap}
.topbar-promo-sound{width:31px;height:31px;flex:0 0 31px;border:1px solid #ffffff3b;background:#ffffff18;color:#fff;border-radius:9px;cursor:pointer;display:grid;place-items:center;padding:0}
.topbar-promo-sound:hover{background:#ffffff2b}

/* Neutralize the old large-ad rules if cached */
.home-promo-video{display:none!important}

@media(max-width:1250px){
  .topbar-promo{min-width:190px;max-width:220px}
  .topbar-promo-copy{display:none}
  .topbar-promo-video{width:130px;flex-basis:130px}
}
@media(max-width:980px){
  .topbar-promo{min-width:135px;max-width:150px;padding:5px}
  .topbar-promo-video{width:100px;flex-basis:100px}
  .topbar-promo-sound{width:28px;height:28px;flex-basis:28px}
}
@media(max-width:760px){
  .topbar-promo{display:none}
}


/* Hero promotional video - V25 */
.topbar-promo{display:none!important}
.hero-video-frame{overflow:hidden}
.hero-video-screen{position:relative;padding:0!important;overflow:hidden;background:#06172b!important}
.hero-video-screen video{width:100%;height:100%;object-fit:cover;display:block}
.hero-video-sound{position:absolute;left:10px;bottom:10px;width:36px;height:36px;border:1px solid #ffffff55;border-radius:10px;background:#071d43cc;color:#fff;display:grid;place-items:center;cursor:pointer;z-index:2;backdrop-filter:blur(5px)}
.hero-video-sound:hover{background:#0e4f96}
@media(max-width:620px){.hero-visual{display:block;min-height:205px}.laptop.hero-video-frame{left:50%;transform:translateX(-50%);width:min(310px,90vw);height:190px}.floating-features{display:none}}


/* V26 hero motion + phone attention */
.hero-copy{position:relative;z-index:2}
.hero-contact-bar{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.hero-phone-badge,.hero-whatsapp-badge{text-decoration:none;display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:999px;font-weight:800;font-size:15px;box-shadow:0 10px 28px #001e4f40;transition:transform .25s ease, box-shadow .25s ease}
.hero-phone-badge{background:#fff;color:#0d4fb3;animation:phonePulse 2s ease-in-out infinite}
.hero-whatsapp-badge{background:#12b76a;color:#fff;animation:softFloat 3.2s ease-in-out infinite}
.hero-phone-badge:hover,.hero-whatsapp-badge:hover{transform:translateY(-3px) scale(1.03);box-shadow:0 14px 32px #001e4f55}
.floating-features{perspective:1000px}
.floating-features span{position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;min-width:160px;font-weight:800;box-shadow:0 12px 24px #02173333;animation:featureFloat 3.8s ease-in-out infinite}
.floating-features span::before{content:"";position:absolute;top:0;right:-120%;width:70%;height:100%;background:linear-gradient(90deg,transparent,#ffffff45,transparent);transform:skewX(-22deg);animation:shineSweep 3.6s linear infinite}
.floating-features span:nth-child(2){animation-delay:.35s}.floating-features span:nth-child(3){animation-delay:.7s}.floating-features span:nth-child(4){animation-delay:1.05s}.floating-features span:nth-child(5){animation-delay:1.4s}
.floating-features .phone-feature{background:linear-gradient(90deg,#0ea5ff,#19c37d);border-color:#baf5df;color:#fff;font-size:18px;letter-spacing:.5px;animation:featureFloat 2.4s ease-in-out infinite, phoneGlow 1.8s ease-in-out infinite}
@keyframes featureFloat{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-8px) scale(1.03)}}
@keyframes shineSweep{0%{right:-120%}55%,100%{right:140%}}
@keyframes phonePulse{0%,100%{transform:scale(1);box-shadow:0 10px 28px #001e4f40}50%{transform:scale(1.06);box-shadow:0 16px 34px #fff3}}
@keyframes phoneGlow{0%,100%{box-shadow:0 10px 24px #0ea5ff30}50%{box-shadow:0 16px 34px #19c37d66}}
@keyframes softFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@media (max-width:1200px){.hero-contact-bar{justify-content:flex-start}.floating-features span{min-width:145px}}
@media (max-width:620px){.hero-contact-bar{flex-direction:column}.hero-phone-badge,.hero-whatsapp-badge{justify-content:center}.hero-visual{display:block}.floating-features{position:static;margin-top:14px}.floating-features span{min-width:unset;width:100%}}


/* V27 logo integration */
.logo-brand{display:grid;gap:10px;justify-items:center;text-align:center;padding:10px 4px 18px}
.brand-logo-wrap{width:100%;background:#fff;border-radius:18px;padding:10px;box-shadow:0 10px 28px #00000022;border:1px solid #ffffff1a}
.brand-logo-img{width:100%;max-width:180px;display:block;margin:0 auto;filter:drop-shadow(0 6px 12px rgba(0,0,0,.12))}
.brand-text strong{font-size:22px;letter-spacing:.8px}
.brand-text span{font-size:14px;color:#cfe1ff}
.brand-avatar{overflow:hidden;background:#fff;padding:2px}
.brand-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.hero-logo-chip{display:inline-flex;align-items:center;gap:10px;background:#ffffff16;border:1px solid #ffffff33;border-radius:999px;padding:8px 12px;margin-bottom:10px;backdrop-filter:blur(8px)}
.hero-logo-chip img{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#fff;padding:2px}
.hero-logo-chip span{font-size:12px;color:#d7ebff;font-weight:700}
@media(max-width:760px){.brand-logo-img{max-width:150px}.hero-logo-chip{display:flex;width:fit-content;max-width:100%}.hero-logo-chip span{font-size:11px}}


/* V28 - 48 hour free trial */
.hero-trial-promo{margin-top:12px;display:inline-flex;align-items:center;gap:8px;background:linear-gradient(90deg,#fff3c4,#ffffff);color:#775500;border:1px solid #ffe08a;border-radius:12px;padding:8px 12px;font-weight:800;font-size:12px;box-shadow:0 8px 20px #001a4530;animation:trialPromoPulse 2.6s ease-in-out infinite}
.trial-info-card{background:linear-gradient(135deg,#eef5ff,#fff);border-color:#cbdcff!important}
.status-pill.status-trial{background:#e8f0ff;color:#1d4ed8}
.admin-stat-trial{background:linear-gradient(135deg,#eef4ff,#f8fbff)!important;border-color:#c8d9ff!important}
@keyframes trialPromoPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.025)}}
@media(max-width:620px){.hero-trial-promo{font-size:12px;line-height:1.7}}


/* V29 animated video logo */
.video-logo-wrap{background:linear-gradient(135deg,#fff,#e8f1ff);padding:8px}
.brand-logo-video{width:100%;max-width:190px;display:block;margin:0 auto;border-radius:14px;object-fit:cover;box-shadow:0 8px 18px rgba(0,0,0,.12)}
.video-avatar{overflow:hidden;background:#fff;padding:0}
.video-avatar video{width:100%;height:100%;object-fit:cover;border-radius:50%}
.video-hero-chip{display:inline-flex;align-items:center;gap:10px}
.video-hero-chip video{width:48px;height:48px;border-radius:50%;object-fit:cover;background:#fff;padding:2px;box-shadow:0 6px 14px rgba(0,0,0,.18)}
@media(max-width:760px){.brand-logo-video{max-width:155px}.video-hero-chip video{width:42px;height:42px}}


/* V30 profile photo */
.profile-avatar-mini,.profile-avatar-home{overflow:hidden;position:relative;background:linear-gradient(135deg,#0d3e75,#178cff)}
.profile-avatar-mini img,.profile-avatar-home img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
.profile-avatar-mini span,.profile-avatar-home span{width:100%;height:100%;display:grid;place-items:center;color:#fff;font-weight:800}
.profile-photo-panel{display:flex;align-items:center;gap:22px;background:linear-gradient(135deg,#f8fbff,#eef5ff);border:1px solid #dbe8f7;border-radius:20px;padding:22px;margin:10px 0 22px;box-shadow:0 10px 26px #1231520c}
.profile-photo-preview{width:132px;height:132px;flex:0 0 132px;border-radius:50%;overflow:hidden;background:linear-gradient(135deg,#0b2d64,#178cff);border:6px solid #fff;box-shadow:0 12px 28px #0b2d6422;display:grid;place-items:center}
.profile-photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.profile-photo-preview span{font-size:50px;color:#fff}
.profile-photo-info{min-width:0}.profile-photo-info h3{margin:0 0 5px;font-size:21px;color:#102a43}.profile-photo-info p{margin:0 0 13px;color:#6b7c93;line-height:1.8}.profile-photo-info small{display:block;margin-top:10px;color:#7b8798}
.profile-photo-actions{display:flex;gap:10px;flex-wrap:wrap}.profile-photo-primary{background:#1677ff;color:#fff}.profile-photo-remove{background:#fff0f3;color:#c9253f;border:1px solid #ffd4dc}
.profile-photo-primary:disabled,.profile-photo-remove:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:680px){.profile-photo-panel{flex-direction:column;text-align:center}.profile-photo-actions{justify-content:center}.profile-photo-preview{width:112px;height:112px;flex-basis:112px}}


/* V31 animated wavy blue hero */
.hero > *{position:relative;z-index:1}
@keyframes heroBlueFlow{
  0%{background-position:0% 0%,0% 50%}
  50%{background-position:18% 10%,100% 45%}
  100%{background-position:5% 18%,0% 55%}
}
@keyframes heroWaveDrift{
  0%,100%{transform:translate3d(-1%,0,0) scaleY(1) skewX(0deg);opacity:.92}
  25%{transform:translate3d(1.5%,-4px,0) scaleY(1.05) skewX(-2deg);opacity:1}
  50%{transform:translate3d(-1.5%,3px,0) scaleY(.96) skewX(2deg);opacity:.9}
  75%{transform:translate3d(2%,-2px,0) scaleY(1.04) skewX(-1deg);opacity:.98}
}
@keyframes heroOrbFloat{
  0%,100%{transform:translateY(0) scale(1)}
  50%{transform:translateY(10px) scale(1.05)}
}


/* V32 free local background remover */
.tools-hub-page{background:linear-gradient(180deg,#fff,#f8fbff)}
.free-tool-badge{background:#e9fbf0;color:#14804a;border:1px solid #bfeccc;border-radius:999px;padding:8px 13px;font-size:12px;font-weight:800}
.bg-remover-card{margin-top:16px;border:1px solid #dfe9f5;border-radius:24px;background:#fff;box-shadow:0 14px 36px #102a430d;overflow:hidden}
.bg-remover-head{padding:22px 24px;display:flex;justify-content:space-between;align-items:flex-start;gap:18px;background:linear-gradient(135deg,#071d43,#0a4f9f);color:#fff}
.bg-remover-head h2{margin:6px 0 4px;font-size:25px}.bg-remover-head p{margin:0;color:#d7eaff;max-width:720px;line-height:1.8;font-size:13px}
.tool-eyebrow{font-size:11px;font-weight:800;color:#9ed5ff}.privacy-chip{background:#ffffff18;border:1px solid #ffffff35;border-radius:999px;padding:8px 12px;font-size:11px;font-weight:800;white-space:nowrap}
.bg-remover-workspace{display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;padding:20px}
.bg-upload-panel{background:#f7faff;border:1px solid #e0e9f4;border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:12px;align-content:start}
.bg-dropzone{min-height:180px;border:2px dashed #b9cbe0;background:#fff;border-radius:16px;display:grid;place-items:center;gap:5px;align-content:center;cursor:pointer;color:#27415f;transition:.2s}
.bg-dropzone:hover{border-color:#3183e6;background:#f1f7ff;transform:translateY(-2px)}.bg-drop-icon{font-size:38px}.bg-dropzone strong{font-size:16px}.bg-dropzone small{color:#7d8da1}
.bg-status-wrap{display:grid;gap:7px}.bg-progress{height:7px;background:#e5edf7;border-radius:999px;overflow:hidden}.bg-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#1677ff,#20c997);transition:width .3s;border-radius:inherit}.bg-status-wrap small{color:#6d7d90;line-height:1.5}
.bg-run-btn{background:linear-gradient(135deg,#1767d2,#0ea5e9);color:#fff;width:100%}.bg-run-btn:disabled{background:#cbd5e1;color:#718096;cursor:not-allowed}.bg-model-note{font-size:10px;line-height:1.7;color:#7d8b9e;margin:0}
.bg-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;min-width:0}.bg-preview-card{border:1px solid #e2e9f2;border-radius:18px;background:#fbfdff;padding:12px;display:flex;flex-direction:column;gap:10px}.bg-preview-title{display:flex;justify-content:space-between;align-items:center;gap:8px}.bg-preview-title span{font-size:10px;background:#eef4ff;color:#1767d2;border-radius:999px;padding:5px 8px}
.bg-preview-stage{min-height:360px;border-radius:14px;overflow:hidden;background:#f0f4f8;display:grid;place-items:center;position:relative}.bg-preview-stage img{max-width:100%;max-height:420px;object-fit:contain;display:block}.bg-preview-empty{color:#8d9bae;font-size:12px;text-align:center;padding:25px}
.checkerboard{background-color:#fff;background-image:linear-gradient(45deg,#e9eef4 25%,transparent 25%),linear-gradient(-45deg,#e9eef4 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e9eef4 75%),linear-gradient(-45deg,transparent 75%,#e9eef4 75%);background-size:22px 22px;background-position:0 0,0 11px,11px -11px,-11px 0}
.bg-download-btn{background:#1f8b57;color:#fff;width:100%;margin-top:auto}.bg-download-btn:disabled{background:#cbd5e1;color:#718096;cursor:not-allowed}
@media(max-width:980px){.bg-remover-workspace{grid-template-columns:1fr}.bg-preview-stage{min-height:300px}}
@media(max-width:650px){.bg-remover-head{flex-direction:column}.bg-preview-grid{grid-template-columns:1fr}.bg-preview-stage{min-height:260px}}

/* V33 higher quality background removal */
.bg-remover-head{background:linear-gradient(135deg,#061a3d,#0a5db8)}
.bg-run-btn{box-shadow:0 8px 20px #1767d22a}


/* V34 live account notifications */
.notification-wrap{position:relative;display:flex;align-items:center}
.notification-panel{position:absolute;top:52px;left:0;width:min(390px,calc(100vw - 30px));max-height:520px;background:#fff;border:1px solid #dfe8f3;border-radius:18px;box-shadow:0 24px 65px #0a21473b;z-index:80;overflow:hidden;color:#10213d;direction:rtl}
.notification-panel[hidden]{display:none!important}
.notification-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid #edf2f7;background:linear-gradient(180deg,#fbfdff,#f7faff)}
.notification-panel-head strong{display:block;font-size:17px}.notification-panel-head small{display:block;color:#78879a;font-size:11px;margin-top:2px}
.notification-text-btn{border:0;background:transparent;color:#1677ff;font-weight:800;cursor:pointer;font-family:inherit;white-space:nowrap}
.notification-list{max-height:365px;overflow:auto;padding:7px}
.notification-item{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;text-align:right;border:0;background:#fff;padding:11px;border-radius:13px;cursor:pointer;font-family:inherit;color:#10213d;transition:.2s;position:relative}
.notification-item:hover{background:#f4f8fd}.notification-item.unread{background:#eef5ff}.notification-item.unread:after{content:"";position:absolute;left:11px;top:13px;width:8px;height:8px;border-radius:50%;background:#1677ff;box-shadow:0 0 0 4px #1677ff16}
.notification-icon{width:42px;height:42px;border-radius:13px;background:#edf4ff;display:grid;place-items:center;font-size:19px}
.notification-item[data-type="trial"] .notification-icon{background:#fff3cf}.notification-item[data-type="warning"] .notification-icon{background:#ffe9ec}.notification-item[data-type="subscription"] .notification-icon{background:#e7f8ee}.notification-item[data-type="success"] .notification-icon{background:#e7f8ee}
.notification-copy strong{display:block;font-size:13px;padding-left:16px}.notification-copy p{margin:4px 0 5px;font-size:11px;line-height:1.7;color:#5f6e82}.notification-copy time{font-size:10px;color:#94a0b0}
.notification-empty{text-align:center;padding:38px 16px;color:#8190a4;font-size:12px}
.notification-panel-foot{padding:10px;border-top:1px solid #edf2f7;background:#fbfcfe}.notification-browser-btn{width:100%;border:1px solid #d6e4f5;background:#eef5ff;color:#155fbd;border-radius:11px;padding:9px 12px;font-family:inherit;font-weight:800;cursor:pointer}.notification-browser-btn.enabled{background:#e8f8ee;color:#168148;border-color:#c7ecd5}
.notif b[hidden]{display:none!important}
@media(max-width:620px){.notification-panel{position:fixed;top:78px;right:10px;left:10px;width:auto;max-height:calc(100vh - 95px)}.notification-list{max-height:calc(100vh - 220px)}}


/* =========================
   V35 DARK MODE
   ========================= */
:root{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
body,.topbar,.content-card,.simple-page,.service-card,.placeholder-card,.modal-panel,.template-card,.pdf-panel,.pdf-tool-card,.ai-form-card,.ai-result-card,.writer-main-panel,.writer-sidebar,.quick-templates-panel,.images-studio-card,.images-canvas-card,.images-side-box,.bg-remover-card,.bg-upload-panel,.bg-preview-card,.school-sources-panel,.school-draft-panel,.account-card,.trial-info-card,.notification-panel,input,textarea,select,.icon-btn,.profile-mini{transition:background-color .25s ease,border-color .25s ease,color .25s ease,box-shadow .25s ease}

html[data-theme="dark"] body{background:#06101c;color:#e6edf7}
html[data-theme="dark"] .main{background:#07131f}
html[data-theme="dark"] .topbar{background:#0b1725;border-bottom-color:#1d3045;box-shadow:0 5px 18px #0004}
html[data-theme="dark"] .search-wrap input,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{background:#0f2031!important;border-color:#28415a!important;color:#eaf2fb!important}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#8192a6!important}
html[data-theme="dark"] .search-icon{color:#9db0c3}
html[data-theme="dark"] .icon-btn{background:#112236;color:#f4f8fc;border:1px solid #263d56}
html[data-theme="dark"] .icon-btn:hover{background:#18304a}
html[data-theme="dark"] .profile-mini{color:#e7eff8}
html[data-theme="dark"] .profile-mini small{color:#91a3b7}

html[data-theme="dark"] .content-card,
html[data-theme="dark"] .simple-page,
html[data-theme="dark"] .placeholder-card,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .posts-card,
html[data-theme="dark"] .articles article,
html[data-theme="dark"] .quick-templates-panel,
html[data-theme="dark"] .writer-sidebar,
html[data-theme="dark"] .writer-main-panel,
html[data-theme="dark"] .images-studio-card,
html[data-theme="dark"] .images-canvas-card,
html[data-theme="dark"] .images-side-box,
html[data-theme="dark"] .pdf-panel,
html[data-theme="dark"] .pdf-tool-card,
html[data-theme="dark"] .ai-form-card,
html[data-theme="dark"] .ai-result-card,
html[data-theme="dark"] .school-sources-panel,
html[data-theme="dark"] .school-draft-panel,
html[data-theme="dark"] .bg-remover-card,
html[data-theme="dark"] .bg-upload-panel,
html[data-theme="dark"] .bg-preview-card,
html[data-theme="dark"] .trial-info-card{background:#0c1a29!important;border-color:#20364d!important;color:#e7eef7;box-shadow:0 10px 26px #0003}

html[data-theme="dark"] .service-card.pdf,
html[data-theme="dark"] .service-card.ai,
html[data-theme="dark"] .service-card.admin,
html[data-theme="dark"] .service-card.school,
html[data-theme="dark"] .service-card.docs,
html[data-theme="dark"] .service-card.images,
html[data-theme="dark"] .service-card.tools,
html[data-theme="dark"] .service-card.community{background:#102235!important;border-color:#243c54!important}
html[data-theme="dark"] .service-card:hover{box-shadow:0 14px 28px #0005}

html[data-theme="dark"] .section-head p,
html[data-theme="dark"] .service-card p,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .expiry span,
html[data-theme="dark"] .expiry small,
html[data-theme="dark"] .account-user span,
html[data-theme="dark"] .articles small,
html[data-theme="dark"] .post small,
html[data-theme="dark"] .template-info p,
html[data-theme="dark"] .images-title-wrap p,
html[data-theme="dark"] .images-results-head p,
html[data-theme="dark"] .writer-main-head p,
html[data-theme="dark"] .writer-sidebar-head p{color:#93a5b8!important}

html[data-theme="dark"] .stats div,
html[data-theme="dark"] .templates-toolbar,
html[data-theme="dark"] .templates-tabs,
html[data-theme="dark"] .selected-images-canvas,
html[data-theme="dark"] .live-images-grid,
html[data-theme="dark"] .pdf-workspace,
html[data-theme="dark"] .school-search-box,
html[data-theme="dark"] .bg-dropzone,
html[data-theme="dark"] .notification-list{background:#0a1724!important;border-color:#21374d!important}

html[data-theme="dark"] .template-card,
html[data-theme="dark"] .writer-doc-item,
html[data-theme="dark"] .official-service-card,
html[data-theme="dark"] .image-result-card,
html[data-theme="dark"] .selected-image-card,
html[data-theme="dark"] .ai-example,
html[data-theme="dark"] .admin-stat{background:#102235!important;border-color:#29435c!important;color:#e8f0f9}

html[data-theme="dark"] .modal-panel{background:#0d1c2b;border:1px solid #294158;color:#edf4fb}
html[data-theme="dark"] .modal-close{background:#162a3d;color:#fff}
html[data-theme="dark"] .auth-tabs{background:#081421}
html[data-theme="dark"] .auth-tab.active{background:#17314a;color:#78b7ff;box-shadow:none}

html[data-theme="dark"] .notification-panel{background:#0b1927;border-color:#2a4259;color:#eaf2fa;box-shadow:0 18px 45px #0008}
html[data-theme="dark"] .notification-panel-head,
html[data-theme="dark"] .notification-panel-foot{border-color:#20364a}
html[data-theme="dark"] .notification-item{border-color:#20364a;background:#0d2030}
html[data-theme="dark"] .notification-item.unread{background:#102944}

html[data-theme="dark"] .profile-photo-panel{background:linear-gradient(135deg,#0f2031,#0b1724);border-color:#294158}
html[data-theme="dark"] .profile-photo-preview{border-color:#15283b}

html[data-theme="dark"] .writer-paper-shell{background:#07131f;border-color:#23394e}
html[data-theme="dark"] .writer-paper{background:#f9fafb;color:#1c2a38}
html[data-theme="dark"] .writer-paper .template-editor-paper{color:#243b53}
html[data-theme="dark"] .writer-paper-meta-item strong{background:#e8edf3;color:#243b53}

html[data-theme="dark"] .bg-preview-stage,
html[data-theme="dark"] .images-empty-state,
html[data-theme="dark"] .selected-images-empty{background:#091522!important;border-color:#294057!important;color:#9fb0c1}

html[data-theme="dark"] footer{color:#8fa2b6}
html[data-theme="dark"] footer a{color:#9dc7ff}
html[data-theme="dark"] .link-btn,
html[data-theme="dark"] .mini-link{color:#67a9ff}
html[data-theme="dark"] .toast{background:#e8f1fb;color:#0b1c2b}

html[data-theme="dark"] .admin-table{color:#e8eff7}
html[data-theme="dark"] .admin-table th{background:#12263a;color:#dce9f5}
html[data-theme="dark"] .admin-table td{border-color:#20364d}
html[data-theme="dark"] .admin-table tr:hover td{background:#102337}

html[data-theme="dark"] .checkerboard{background-color:#dfe5eb}

@media (prefers-reduced-motion:reduce){
  body,.topbar,.content-card,.simple-page,.service-card,.placeholder-card,.modal-panel,.template-card,.pdf-panel,.pdf-tool-card,.ai-form-card,.ai-result-card,.writer-main-panel,.writer-sidebar,.quick-templates-panel,.images-studio-card,.images-canvas-card,.images-side-box,.bg-remover-card,.bg-upload-panel,.bg-preview-card,.school-sources-panel,.school-draft-panel,.account-card,.trial-info-card,.notification-panel,input,textarea,select,.icon-btn,.profile-mini{transition:none}
}


/* =========================
   TEACHER KIT - V36
   ========================= */
.service-card.teacher-service{background:#eef4ff}
.teacher-kit-page{display:grid;gap:14px}
.teacher-top-strip{background:#091a36;color:#fff;border:1px solid #19345d;border-radius:18px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px;box-shadow:0 10px 28px #07172d1c}
.teacher-title-block{display:flex;align-items:center;gap:12px}.teacher-title-block h1{font-size:22px;margin:0 0 3px}.teacher-title-block p{margin:0;color:#a9bdd8;font-size:11px}
.teacher-folder-icon{width:44px;height:44px;border-radius:13px;background:linear-gradient(135deg,#6e72ff,#2e8bff);display:grid;place-items:center;font-size:25px;box-shadow:0 8px 18px #2252a84a}
.teacher-top-actions{display:flex;align-items:center;gap:8px}.teacher-add-btn{background:#1e5cc9;color:#fff;border:1px solid #72a2ff}.teacher-moon-btn{width:40px;height:40px;border:1px solid #445978;background:#1b2942;color:#fff;border-radius:11px;cursor:pointer;font-size:20px}
.teacher-workspace{display:grid;grid-template-columns:320px minmax(0,1fr);gap:14px;direction:ltr;align-items:start}.teacher-workspace>*{direction:rtl}
.teacher-library-panel,.teacher-preview-panel{background:#0b1427;border:1px solid #1c2b47;border-radius:18px;color:#e9f0fa;box-shadow:0 12px 30px #0613291e}
.teacher-library-panel{padding:14px;display:flex;flex-direction:column;gap:12px;max-height:780px;overflow:hidden}
.teacher-search-panel{background:#101c32;border:1px solid #263a5c;border-radius:15px;padding:12px}.teacher-search-row{position:relative}.teacher-search-row input{width:100%;background:#0a1325;border:1px solid #2b3d5c;color:#fff;border-radius:9px;padding:10px 38px 10px 10px;outline:none}.teacher-search-row span{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#8ea4c3}
.teacher-filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.teacher-filter-grid select{width:100%;background:#0a1325;border:1px solid #2b3d5c;color:#dbe7f7;border-radius:9px;padding:9px}
.teacher-chip-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.teacher-chip{border:1px solid #2b3d5c;background:#16233b;color:#9eb3d0;border-radius:999px;padding:6px 9px;font-size:10px;cursor:pointer}.teacher-chip.active{background:#1887ff;color:#fff;border-color:#47a0ff}.teacher-chip[data-teacher-filter="fav"]{color:#f9c74f}
.teacher-list-head{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#8fa5c3}.teacher-view-toggle{display:flex;gap:5px}.teacher-view-toggle button{border:1px solid #2a3e60;background:#121f35;color:#93a9c7;border-radius:7px;width:30px;height:28px}.teacher-view-toggle button.active{background:#163c70;color:#70afff}
.teacher-docs-list{display:grid;gap:8px;overflow:auto;padding-left:2px}.teacher-doc-item{border:1px solid #1f304f;background:#0e192d;border-radius:12px;padding:10px;display:grid;grid-template-columns:34px minmax(0,1fr) 28px;align-items:center;gap:8px;cursor:pointer;transition:.2s}.teacher-doc-item:hover{background:#12233d;border-color:#31527f}.teacher-doc-item.active{background:linear-gradient(135deg,#143568,#172d50);border-color:#3478db;box-shadow:0 0 0 1px #3478db33 inset}.teacher-doc-icon{width:32px;height:32px;border-radius:9px;background:#071122;display:grid;place-items:center}.teacher-doc-main strong{display:block;font-size:12px;line-height:1.5;color:#f1f6fd}.teacher-doc-main small{display:block;color:#7f94b2;font-size:9px;margin-top:3px}.teacher-doc-star{border:0;background:transparent;color:#5f7595;font-size:17px;cursor:pointer}.teacher-doc-star.active{color:#f9c74f}
.teacher-preview-panel{padding:14px;min-height:780px}.teacher-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.teacher-preview-meta{font-size:10px;color:#8297b5}.teacher-preview-toolbar h2{font-size:15px;margin:3px 0 0;color:#fff}.teacher-preview-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.teacher-blue-btn{background:#2869e8;color:#fff;padding:8px 12px;font-size:10px}.teacher-green-btn{background:#14a16d;color:#fff;padding:8px 12px;font-size:10px}.teacher-icon-action{width:34px;height:34px;border:1px solid #2d405f;background:#142138;color:#d7e3f4;border-radius:9px;cursor:pointer}
.teacher-preview-canvas{background:#111c31;border:1px solid #243754;border-radius:14px;padding:14px;min-height:660px;overflow:auto;display:grid;place-items:start center}.teacher-paper{width:min(760px,100%);min-height:980px;background:#fff;color:#172033;border-radius:4px;box-shadow:0 18px 40px #0005;padding:44px 48px;font-family:"Cairo",Arial,sans-serif;line-height:1.8}.teacher-paper h1{text-align:center;font-size:25px;margin:0 0 26px;color:#0c315c;text-decoration:underline;text-underline-offset:5px}.teacher-paper h2{font-size:17px;color:#0e477d;margin-top:24px}.teacher-paper p{font-size:13px}.teacher-paper table{width:100%;border-collapse:collapse;margin:16px 0;font-size:12px}.teacher-paper th,.teacher-paper td{border:1px solid #cbd5e1;padding:9px;text-align:center}.teacher-paper th{background:#eaf3ff;color:#153c66}.teacher-fill{display:inline-block;min-width:120px;border-bottom:1px dashed #6b7280;color:#6b7280;padding:0 5px}.teacher-note-box{background:#f5f8fc;border:1px solid #d8e2ef;border-radius:10px;padding:12px;margin:12px 0}.teacher-preview-image,.teacher-preview-pdf{width:100%;min-height:620px;border:0;background:#fff}.teacher-preview-image{object-fit:contain;max-height:720px}.teacher-preview-foot{display:flex;justify-content:space-between;gap:12px;color:#7086a5;font-size:9px;padding:10px 2px 0}
.teacher-upload-note{padding:30px;text-align:center;color:#64748b}.teacher-upload-note strong{display:block;color:#173b64;font-size:18px;margin-bottom:8px}
@media(max-width:1100px){.teacher-workspace{grid-template-columns:1fr}.teacher-library-panel{max-height:none}.teacher-docs-list{max-height:420px}.teacher-preview-panel{min-height:auto}}
@media(max-width:700px){.teacher-top-strip,.teacher-preview-toolbar,.teacher-preview-foot{flex-direction:column;align-items:stretch}.teacher-filter-grid{grid-template-columns:1fr}.teacher-paper{padding:28px 18px;min-height:700px}.teacher-preview-canvas{padding:7px}.teacher-preview-actions .btn{flex:1}}
html[data-theme="dark"] .teacher-kit-page{color:#eaf2ff}


/* V37 advertising marketplace */
.home-ad-zone{margin-top:18px;background:#fff;border:1px solid #e1e9f3;border-radius:20px;padding:14px 16px;box-shadow:0 10px 28px #1231520d;overflow:hidden}
.home-ad-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.home-ad-head>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.home-ad-head strong{font-size:16px}.home-ad-head small{color:#7d8ca0}.sponsored-label{background:#eef2f7;color:#69778a;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800}.home-ad-cta{border:0;background:#102e5f;color:#fff;border-radius:11px;padding:9px 13px;font-weight:800;cursor:pointer}
.home-ad-carousel{min-height:136px}.home-ad-placeholder,.home-ad-slide{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;border-radius:16px;padding:14px;background:linear-gradient(135deg,#f4f8ff,#eef8ff);border:1px dashed #b8d1ef;min-height:108px}.home-ad-placeholder-icon{font-size:38px}.home-ad-placeholder p,.home-ad-slide p{margin:4px 0 0;color:#64748b;font-size:12px}.home-ad-placeholder button,.home-ad-slide .ad-slide-link{border:0;background:#1677ff;color:#fff;border-radius:10px;padding:9px 12px;font-weight:800;text-decoration:none;cursor:pointer;text-align:center}.home-ad-slide-img{width:150px;height:84px;border-radius:12px;object-fit:cover;background:#e8eef5}.home-ad-slide-info{min-width:0}.home-ad-slide-info strong{font-size:17px}.home-ad-slide-info small{display:block;color:#7b8798;margin-top:3px}.home-ad-video-banner{position:relative;min-height:132px;border-radius:18px;overflow:hidden;border:1px solid #c8dcfb;box-shadow:0 12px 28px #12315218;background:#08275f}.home-ad-banner-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:saturate(1.05) contrast(1.02) brightness(.72)}.home-ad-banner-overlay{position:relative;z-index:1;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;min-height:132px;padding:18px 20px;background:linear-gradient(90deg,#041b44cc 0%,#08398b8f 48%,#0a56b2a3 100%)}.home-ad-banner-tag{display:inline-flex;align-items:center;justify-content:center;background:#ffffff1d;color:#fff;border:1px solid #ffffff38;border-radius:999px;padding:9px 12px;font-size:12px;font-weight:800;backdrop-filter:blur(8px)}.home-ad-banner-copy strong{display:block;font-size:22px;line-height:1.4;color:#fff}.home-ad-banner-copy p{margin:6px 0 0;color:#e5efff;font-size:13px;line-height:1.7;max-width:700px}.home-ad-banner-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.home-ad-banner-phone,.home-ad-banner-btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border:0;border-radius:12px;padding:11px 16px;font-weight:900;font-size:14px;cursor:pointer}.home-ad-banner-phone{background:#fff;color:#0e55b4;box-shadow:0 10px 24px #00133b26}.home-ad-banner-btn{background:linear-gradient(135deg,#1d7cff,#18c6b3);color:#fff;box-shadow:0 12px 26px #0e58c840;animation:adBtnPulse 1.9s ease-in-out infinite}.home-ad-dots{display:flex;justify-content:center;gap:6px;margin-top:10px}.home-ad-dots button{width:7px;height:7px;padding:0;border:0;border-radius:50%;background:#c7d2e0;cursor:pointer}.home-ad-dots button.active{background:#1677ff;transform:scale(1.25)}@keyframes adBtnPulse{0%,100%{transform:scale(1);box-shadow:0 12px 26px #0e58c840}50%{transform:scale(1.05);box-shadow:0 18px 32px #0e58c85f}}
.ads-page-head{align-items:flex-start}.ads-kicker{display:inline-block;color:#1767d2;font-weight:800;margin-bottom:5px}.ads-whatsapp-btn{background:#13b96c;color:#fff;text-decoration:none}.ads-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:18px;align-items:start}.ads-showcase-card,.ad-submit-card,.my-ad-requests,.admin-ads-panel{background:#fff;border:1px solid #e4ebf4;border-radius:20px;padding:16px;box-shadow:0 8px 24px #1231520b}.ads-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}.ads-section-title strong{display:block;font-size:18px}.ads-section-title small{display:block;color:#8290a2;margin-top:2px}.ads-section-title>span{background:#eef4ff;color:#1767d2;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:800}.approved-ads-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.approved-ad-card{border:1px solid #e2e9f2;border-radius:16px;overflow:hidden;background:#fff}.approved-ad-card img{width:100%;height:160px;object-fit:cover;display:block;background:#eef2f7}.approved-ad-body{padding:12px}.approved-ad-body h3{margin:0 0 5px;font-size:16px}.approved-ad-body p{margin:0 0 8px;color:#65748a;font-size:12px;line-height:1.7}.approved-ad-meta{display:flex;justify-content:space-between;gap:8px;align-items:center}.approved-ad-meta small{color:#8a97a8}.approved-ad-link{font-size:11px;color:#1767d2;text-decoration:none;font-weight:800}.ads-empty{grid-column:1/-1;min-height:210px;border:1px dashed #d6dfeb;border-radius:16px;display:grid;place-items:center;text-align:center;align-content:center;gap:5px;color:#7d8b9d;background:#fbfcfe;padding:20px}.ads-empty span{font-size:38px}.ads-empty p{margin:0;font-size:12px}.ads-empty.compact{min-height:80px;font-size:12px}
.ad-submit-head{display:flex;gap:10px;align-items:flex-start;margin-bottom:13px}.ad-submit-head>span{font-size:28px}.ad-submit-head strong{display:block;font-size:18px}.ad-submit-head small{display:block;color:#7d8ca0;line-height:1.6}.ad-request-form{display:grid;gap:11px}.ad-request-form label{display:grid;gap:6px;font-size:12px;font-weight:800;color:#43536a}.ad-request-form input,.ad-request-form textarea{border:1px solid #dce5f0;border-radius:10px;padding:10px;background:#fff;outline:none;width:100%;resize:vertical}.ad-request-form input:focus,.ad-request-form textarea:focus{border-color:#8db6f6;box-shadow:0 0 0 3px #1677ff12}.ad-form-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.ad-image-picker input{padding:8px;background:#f8fafc}.ad-image-picker span{font-size:10px;color:#8794a4;font-weight:500}.ad-image-preview-wrap{border:1px solid #dce5ef;border-radius:12px;overflow:hidden;background:#f4f7fb}.ad-image-preview-wrap img{width:100%;max-height:190px;object-fit:contain;display:block}.ad-submit-btn{background:#1767d2;color:#fff;width:100%}.ad-submit-status{font-size:11px;color:#7b8798;margin:0;line-height:1.7}.my-ad-requests{margin-top:18px}.my-ad-requests-list{display:grid;gap:10px}.my-ad-request{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:11px;border:1px solid #e5ebf3;border-radius:13px;padding:9px}.my-ad-request img{width:72px;height:55px;object-fit:cover;border-radius:9px}.my-ad-request strong{display:block;font-size:13px}.my-ad-request small{color:#7c899a}.ad-status{font-size:10px;padding:5px 8px;border-radius:999px;font-weight:800;white-space:nowrap}.ad-status.pending{background:#fff3cd;color:#8a6500}.ad-status.approved{background:#dff7e8;color:#157d46}.ad-status.rejected{background:#ffe4e8;color:#b4233c}
.admin-ads-panel{margin-top:22px}.admin-ad-stats{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:12px}.admin-ad-stats span{background:#f4f7fb;border:1px solid #e1e7ef;border-radius:999px;padding:7px 10px;font-size:11px}.admin-ads-list{display:grid;gap:10px}.admin-ad-item{display:grid;grid-template-columns:110px minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid #e1e8f1;border-radius:14px;padding:10px;background:#fbfcfe}.admin-ad-item img{width:110px;height:72px;border-radius:10px;object-fit:cover}.admin-ad-info strong{display:block}.admin-ad-info p{margin:3px 0;color:#69778a;font-size:11px}.admin-ad-info small{color:#8c98a7}.admin-ad-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.admin-ad-actions button{border:0;border-radius:9px;padding:7px 9px;font-weight:800;font-size:10px;cursor:pointer}.admin-ad-approve{background:#dff7e8;color:#147945}.admin-ad-reject{background:#fff1c7;color:#8b6500}.admin-ad-delete{background:#ffe5e9;color:#b9233e}
html[data-theme="dark"] .home-ad-zone,html[data-theme="dark"] .ads-showcase-card,html[data-theme="dark"] .ad-submit-card,html[data-theme="dark"] .my-ad-requests,html[data-theme="dark"] .admin-ads-panel{background:#0c1a29;border-color:#20364d;color:#e8f1fa}.dark-placeholder{}
html[data-theme="dark"] .home-ad-placeholder,html[data-theme="dark"] .home-ad-slide,html[data-theme="dark"] .approved-ad-card,html[data-theme="dark"] .my-ad-request,html[data-theme="dark"] .admin-ad-item{background:#102235;border-color:#29435c;color:#edf4fb}.dark-placeholder{}
html[data-theme="dark"] .ads-empty{background:#091522;border-color:#294057;color:#9fb0c1}.dark-placeholder{}
html[data-theme="dark"] .ad-request-form input,html[data-theme="dark"] .ad-request-form textarea{background:#081522;border-color:#294158;color:#edf4fb}.dark-placeholder{}
html[data-theme="dark"] .admin-ad-stats span{background:#112539;border-color:#2b455e;color:#dce8f4}
@media(max-width:1100px){.ads-layout{grid-template-columns:1fr}.approved-ads-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.home-ad-placeholder,.home-ad-slide,.home-ad-banner-overlay{grid-template-columns:1fr;text-align:center}.home-ad-slide-img{width:100%;height:150px}.home-ad-head{align-items:flex-start}.home-ad-banner-copy strong{font-size:18px}.home-ad-banner-actions{justify-content:center}.approved-ads-grid{grid-template-columns:1fr}.ad-form-row{grid-template-columns:1fr}.my-ad-request,.admin-ad-item{grid-template-columns:1fr}.my-ad-request img,.admin-ad-item img{width:100%;height:150px}.admin-ad-actions{justify-content:flex-start}}

html[data-theme="dark"] .home-ad-video-banner{border-color:#30507d;background:#07192f}
html[data-theme="dark"] .home-ad-banner-overlay{background:linear-gradient(90deg,#020f25dd 0%,#0a24548a 48%,#11428aa6 100%)}


/* V39 production polish */
.legal-page{line-height:2}.legal-page h1{color:#123c72}.legal-page p{max-width:980px;color:#52657a}.legal-page a{color:#1767d2}
html[data-theme="dark"] .legal-page h1{color:#86baff}html[data-theme="dark"] .legal-page p{color:#bfd0df}
@media print{.sidebar,.topbar,footer,.toast,.notification-panel{display:none!important}.main{margin:0!important;width:100%!important}.page{padding:0!important}}


/* V40 Mobile / installable PWA */
.mobile-menu-btn,.mobile-sidebar-backdrop,.mobile-bottom-nav{display:none}
.install-app-btn{display:block;width:100%;margin:14px 0 0;border:1px solid #5ab6ff;background:#0d4f91;color:#fff;border-radius:12px;padding:11px 10px;font-weight:800;cursor:pointer;box-shadow:0 8px 20px rgba(13,79,145,.16)}
.install-app-btn[hidden]{display:none!important}
.install-app-btn:hover{background:#1169bc;transform:translateY(-1px)}

@media(max-width:900px){
  body{padding-bottom:72px;-webkit-tap-highlight-color:transparent;overflow-x:hidden}
  .app-shell{display:block}
  .sidebar{width:min(86vw,330px)!important;transform:translateX(110%);transition:transform .28s ease;box-shadow:-20px 0 45px #00163444;z-index:120;padding:16px 14px 92px}
  .sidebar.mobile-open{transform:translateX(0)}
  .sidebar .brand{padding-left:44px}
  .sidebar .brand-text{display:block}
  .sidebar .nav-item{font-size:14px;padding:12px 13px;white-space:normal}
  .sidebar .premium-card{display:block}
  .mobile-sidebar-backdrop{display:block;position:fixed;inset:0;border:0;background:#06162d99;backdrop-filter:blur(2px);z-index:115}
  .mobile-sidebar-backdrop[hidden]{display:none}
  .main{margin-right:0!important;width:100%!important;min-width:0}
  .topbar{min-height:66px;height:auto;padding:8px 10px;gap:8px;flex-wrap:nowrap;z-index:80}
  .mobile-menu-btn{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border:0;border-radius:12px;background:#0d4f91;color:#fff;font-size:22px;font-weight:900;cursor:pointer}
  .search-wrap{flex:1;width:auto;min-width:0;order:initial}
  .search-wrap input{height:42px;padding:10px 38px 10px 10px;font-size:12px}
  .search-icon{right:13px;font-size:18px}
  .top-actions{gap:6px;flex:0 0 auto}
  .top-actions .icon-btn{width:39px;height:39px;border-radius:11px}
  .profile-mini{padding:0}
  .profile-mini small,.profile-mini strong{display:none!important}
  .profile-mini .avatar{width:39px;height:39px}
  .page{padding:10px!important}
  .hero{padding:20px 16px!important;border-radius:18px;gap:14px;min-height:auto}
  .hero h1{font-size:27px!important;line-height:1.35}
  .hero h2{font-size:19px!important;line-height:1.55}
  .hero p{font-size:13px;line-height:1.85}
  .hero-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px}
  .hero-actions .btn{padding:11px 8px;font-size:12px}
  .hero-contact-bar{display:grid!important;grid-template-columns:1fr 1fr;gap:8px}
  .hero-phone-badge,.hero-whatsapp-badge{justify-content:center;padding:9px 8px;font-size:12px}
  .hero-trial-promo{font-size:11px!important}
  .hero-visual{display:block!important;min-height:205px!important;margin-top:4px}
  .laptop.hero-video-frame{left:50%!important;bottom:0!important;transform:translateX(-50%)!important;width:min(310px,94%)!important;height:180px!important}
  .floating-features{display:none!important}
  .dashboard-grid{grid-template-columns:1fr!important;gap:12px;margin-top:12px}
  .right-column{grid-template-columns:1fr!important;gap:12px}
  .content-card,.simple-page{border-radius:15px;padding:14px}
  .simple-page{min-height:auto}
  .section-head{align-items:flex-start;gap:8px}
  .section-head h3{font-size:19px}
  .section-head p{font-size:11px}
  .services-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}
  .service-card{min-height:145px;padding:13px 8px;border-radius:13px}
  .service-card h4{font-size:13px;line-height:1.5}
  .service-card p{font-size:10px;line-height:1.6}
  .service-icon{font-size:25px}
  .articles-grid{grid-template-columns:1fr!important;gap:10px}
  .article-cover{height:100px}
  .placeholder-grid{grid-template-columns:1fr!important}
  footer{padding:18px 12px 84px!important;gap:10px;align-items:center!important;text-align:center}
  footer div{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
  footer a{margin:0}
  .modal-panel{width:calc(100% - 20px);margin:4vh auto;max-height:92vh;overflow:auto;padding:20px 16px}
  .notification-panel{top:64px!important;right:8px!important;left:8px!important;max-height:calc(100vh - 145px)!important}
  .notification-list{max-height:calc(100vh - 285px)!important}
  .home-ad-zone{margin-top:12px;padding:10px;border-radius:16px}
  .home-ad-head{margin-bottom:8px}
  .home-ad-head small{display:none}
  .home-ad-video-banner{min-height:230px}
  .home-ad-banner-video{min-height:230px}
  .home-ad-banner-overlay{min-height:230px!important;padding:14px!important;gap:11px!important}
  .home-ad-banner-copy strong{font-size:18px!important}
  .home-ad-banner-copy p{font-size:11px!important}
  .home-ad-banner-actions{display:grid!important;grid-template-columns:1fr;gap:8px!important;width:100%}
  .home-ad-banner-phone,.home-ad-banner-btn{width:100%;font-size:12px;padding:10px}
  .mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;right:0;left:0;bottom:0;z-index:110;background:#fff;border-top:1px solid #dfe8f4;box-shadow:0 -8px 25px #10213d18;padding:6px 5px calc(6px + env(safe-area-inset-bottom));min-height:64px}
  .mobile-nav-btn{border:0;background:transparent;color:#6d7d92;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:11px;padding:5px 2px;cursor:pointer;min-width:0}
  .mobile-nav-btn span{font-size:19px;line-height:1}
  .mobile-nav-btn small{font-size:9px;font-weight:800;white-space:nowrap}
  .mobile-nav-btn.active{background:#eaf4ff;color:#126ad8}
  .toast{left:10px;right:10px;bottom:78px;text-align:center}
  .pdf-panel,.pdf-tool-card,.ai-form-card,.ai-result-card,.images-studio-card,.images-canvas-card,.images-side-box,.school-sources-panel,.school-draft-panel,.account-card,.trial-info-card{border-radius:14px!important}
  input,textarea,select{font-size:16px!important} /* prevents iOS zoom */
  button,.btn,a{touch-action:manipulation}
}

@media(max-width:480px){
  .topbar{padding:7px 8px}
  .search-wrap input{font-size:11px!important}
  .top-actions .icon-btn{width:36px;height:36px}
  .profile-mini .avatar{width:36px;height:36px}
  .mobile-menu-btn{width:38px;height:38px;flex-basis:38px}
  .hero{padding:17px 13px!important}
  .hero h1{font-size:24px!important}
  .hero-actions,.hero-contact-bar{grid-template-columns:1fr!important}
  .services-grid{grid-template-columns:1fr 1fr!important}
  .service-card{min-height:138px}
  .stats{gap:5px}
  .stats div{padding:8px 3px}
  .stats strong{font-size:17px}
  .section-head{flex-direction:column}
  .section-head .link-btn{align-self:flex-start}
  .writer-actions-bar{grid-template-columns:1fr!important}
  .teacher-preview-actions{display:grid!important;grid-template-columns:1fr 1fr}
  .teacher-preview-actions .btn{width:100%}
}

html[data-theme="dark"] .mobile-bottom-nav{background:#081522;border-color:#20364d}
html[data-theme="dark"] .mobile-nav-btn{color:#9aacc0}
html[data-theme="dark"] .mobile-nav-btn.active{background:#102e50;color:#7ac3ff}


/* ========================= V41 — Library Manager ========================= */
.service-card.library-service{background:linear-gradient(145deg,#eefcf7,#f4f8ff);border-color:#bcebd8}
.library-promo-section{margin-top:16px;border-radius:24px;padding:24px 26px;display:grid;grid-template-columns:minmax(0,.84fr) minmax(500px,1.16fr);gap:24px;align-items:center;background:radial-gradient(circle at 85% 20%,rgba(36,179,255,.24),transparent 34%),linear-gradient(135deg,#061d43,#0a3977 58%,#0875bd);color:#fff;box-shadow:0 18px 46px rgba(5,34,79,.18);overflow:hidden;position:relative}
.library-promo-section:before{content:"";position:absolute;width:260px;height:260px;border-radius:50%;background:rgba(54,225,174,.10);left:-90px;bottom:-110px}
.library-promo-copy,.library-dashboard-preview{position:relative;z-index:1}
.library-promo-eyebrow{display:inline-flex;padding:7px 11px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);border-radius:999px;font-size:12px;font-weight:800;color:#dff4ff}
.library-promo-copy h2{font-size:32px;margin:8px 0 8px;line-height:1.22}
.library-promo-copy p{color:#d9eaff;line-height:1.85;margin:0;max-width:640px;font-size:15px}
.library-feature-pills{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}
.library-feature-pills span{border:1px solid rgba(255,255,255,.20);background:rgba(255,255,255,.09);padding:8px 11px;border-radius:11px;font-size:12px;font-weight:700}
.library-promo-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 8px}
.library-primary-btn,.library-secondary-btn,.library-subscribe-inline,.library-open-full{border-radius:12px;padding:12px 18px;font-weight:800;cursor:pointer;text-decoration:none;font-family:inherit}
.library-primary-btn{border:0;background:#fff;color:#0759b7;box-shadow:0 7px 18px rgba(0,0,0,.15)}
.library-secondary-btn{border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.10);color:#fff}
.library-promo-copy small{display:block;color:#bcdcff;margin-top:8px}
.library-dashboard-preview{background:#f8fbff;color:#12233e;border-radius:20px;padding:17px;box-shadow:0 18px 40px rgba(0,0,0,.30);border:1px solid rgba(255,255,255,.7);transform:perspective(900px) rotateY(-2deg)}
.library-preview-top{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px;border-bottom:1px solid #e4ebf5}
.library-preview-top>div{display:flex;align-items:baseline;gap:8px}.library-preview-top strong{color:#0f65d7;font-size:20px}.library-preview-top span{font-size:11px;color:#6b7b91}
.library-preview-live{background:#e9fff2;color:#169750!important;border-radius:999px;padding:5px 9px;font-weight:800}
.library-preview-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}
.library-preview-stats article{background:#fff;border:1px solid #e4ebf4;border-radius:12px;padding:10px;min-height:88px;position:relative}.library-preview-stats small,.library-preview-stats strong{display:block}.library-preview-stats small{color:#718198;font-size:10px}.library-preview-stats strong{margin-top:7px;font-size:15px}.library-preview-stats span{position:absolute;left:8px;bottom:7px;font-size:18px}
.library-preview-chart{background:#fff;border:1px solid #e4ebf4;border-radius:12px;padding:12px}.library-chart-head{display:flex;justify-content:space-between}.library-chart-head small{color:#8796a9}.library-bars{height:80px;display:flex;align-items:flex-end;gap:7px;margin-top:10px}.library-bars i{flex:1;display:block;background:linear-gradient(180deg,#1aa5ff,#1164db);border-radius:5px 5px 2px 2px;min-height:8px}
.library-preview-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;background:#fff;border:1px solid #e5ebf4;border-radius:10px;padding:9px 11px;margin-top:8px;font-size:11px}.library-preview-row b{color:#146ad4}.library-preview-row em{font-style:normal;color:#65809f}
.library-manager-page{min-height:700px;background:#fff;border:1px solid #e6edf6;border-radius:20px;padding:20px}
.library-manager-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.library-manager-head h1{margin:4px 0 3px;font-size:28px}.library-manager-head p{margin:0;color:#6b7c93}.library-manager-kicker{font-size:12px;color:#0b6fd6;font-weight:800}.library-manager-head-actions{display:flex;gap:9px;flex-wrap:wrap}.library-open-full{border:1px solid #c9d8ea;background:#f5f9ff;color:#145fae}.library-subscribe-inline{border:0;background:#106be8;color:white}
.library-manager-benefits{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}.library-manager-benefits span{background:#eef8f4;color:#237051;border:1px solid #d0eadf;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:700}
.library-manager-frame-wrap{border:1px solid #dce6f1;border-radius:16px;overflow:hidden;background:#f5f7fa;box-shadow:inset 0 0 0 1px #fff}.library-manager-frame-wrap iframe{display:block;width:100%;height:780px;border:0;background:white}.library-manager-note{font-size:12px;color:#718198;margin:12px 2px 0}
[data-theme="dark"] .library-manager-page{background:#0f2039;border-color:#253a58;color:#eaf3ff}[data-theme="dark"] .library-manager-head p,[data-theme="dark"] .library-manager-note{color:#a7bbd4}
@media(max-width:1050px){.library-promo-section{grid-template-columns:1fr}.library-dashboard-preview{transform:none}.library-preview-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.library-promo-section{padding:20px;border-radius:18px}.library-promo-copy h2{font-size:27px}.library-dashboard-preview{padding:12px}.library-manager-head{flex-direction:column}.library-manager-head-actions{width:100%}.library-open-full,.library-subscribe-inline{flex:1;text-align:center}.library-manager-frame-wrap iframe{height:680px}.library-preview-row{grid-template-columns:1fr auto}.library-preview-row em{grid-column:1/-1}.library-feature-pills span{font-size:11px}}

/* Library Manager promotional video - V46 */
.library-promo-video-card{position:relative;z-index:1;background:#06172b;border-radius:22px;overflow:hidden;aspect-ratio:16/8.8;box-shadow:0 22px 48px rgba(0,0,0,.34);border:1px solid rgba(255,255,255,.42);min-height:320px}
.library-promo-player{width:100%;height:100%;display:block;object-fit:cover;background:#06172b}
.library-video-badge{position:absolute;top:12px;right:12px;z-index:3;padding:7px 11px;border-radius:999px;background:rgba(6,23,43,.82);border:1px solid rgba(255,255,255,.24);color:#fff;font-size:11px;font-weight:900;backdrop-filter:blur(7px)}
.library-video-sound{position:absolute;left:12px;top:12px;z-index:4;width:40px;height:40px;border-radius:12px;border:1px solid rgba(255,255,255,.35);background:rgba(6,23,43,.82);color:#fff;display:grid;place-items:center;cursor:pointer;backdrop-filter:blur(7px);font-size:17px}
.library-video-sound:hover{background:#0e4f96}
.library-video-bottom{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;justify-content:space-between;align-items:flex-end;gap:12px;padding:74px 18px 16px;background:linear-gradient(180deg,transparent 0%,rgba(4,17,34,.94) 80%);color:#fff}
.library-video-bottom>div{display:grid;gap:2px}.library-video-bottom strong{font-size:16px}.library-video-bottom span{font-size:11px;color:#d8eaff}
.library-video-cta{border:0;border-radius:11px;padding:9px 14px;background:#fff;color:#0759b7;font-weight:900;cursor:pointer;white-space:nowrap}
@media(max-width:700px){.library-promo-video-card{min-height:200px}.library-video-badge{font-size:10px}.library-video-bottom{padding:46px 10px 10px}.library-video-bottom strong{font-size:13px}.library-video-cta{padding:8px 11px;font-size:12px}}

/* V47 library-focused home */
.hero-copy{position:relative;z-index:1}.hero-contact-bar{margin:10px 0 0}.library-promo-section .library-promo-video-card{order:-1}@media(min-width:1060px){.library-promo-section{grid-template-columns:minmax(0,.8fr) minmax(520px,1.2fr)}}@media(max-width:1050px){.library-promo-section .library-promo-video-card{order:0}.hero{grid-template-columns:1fr}.hero-visual{margin-top:10px}.laptop{position:relative;left:auto;right:auto;transform:none;margin:auto}.floating-features{position:static;grid-template-columns:repeat(2,max-content);justify-content:center;margin-top:12px}}@media(max-width:700px){.hero{padding:18px}.hero h1{font-size:28px}.hero h2{font-size:18px}.library-promo-section{padding:18px}.library-promo-video-card{min-height:220px}}

/* V49 declutter: one clear library highlight */
.library-promo-section{border:2px solid rgba(79,166,255,.16)}
.library-promo-copy .eyebrow{display:inline-flex;background:rgba(255,255,255,.1);padding:8px 12px;border-radius:999px} 
@media(max-width:900px){.hero{min-height:auto;grid-template-columns:1fr}.hero-visual{display:none}.library-promo-section{grid-template-columns:1fr}.library-promo-video-card{min-height:230px}}


/* =========================
   V50 — Library Showcase
   ========================= */
.library-promo-section{
  direction:ltr;
  grid-template-columns:minmax(520px,1.16fr) minmax(340px,.84fr);
  gap:26px;
  align-items:center;
  padding:26px 28px;
}
.library-promo-video-card{
  direction:rtl;
  grid-column:1;
  min-height:340px;
  aspect-ratio:16/9;
  box-shadow:0 24px 56px rgba(0,0,0,.36);
}
.library-promo-copy{
  direction:rtl;
  grid-column:2;
  text-align:right;
  padding:8px 2px;
}
.library-promo-copy h2{
  font-size:34px;
  line-height:1.22;
}
.library-promo-copy p{
  font-size:15px;
  line-height:1.95;
}
.library-feature-pills{
  justify-content:flex-start;
}
.library-promo-actions{
  justify-content:flex-start;
}
.library-primary-btn,
.library-secondary-btn{
  min-width:145px;
}
.library-video-bottom{
  padding:72px 18px 16px;
}
.library-video-bottom strong{
  font-size:17px;
}
.after-library-heading{
  margin:24px 0 12px;
  padding:0 4px;
}
.after-library-heading span{
  display:inline-flex;
  background:#edf5ff;
  color:#1168d8;
  border:1px solid #d4e6ff;
  border-radius:999px;
  padding:6px 10px;
  font-size:11px;
  font-weight:900;
}
.after-library-heading h3{
  margin:8px 0 3px;
  font-size:23px;
  color:#10213d;
}
.after-library-heading p{
  margin:0;
  color:#74839a;
  font-size:13px;
}
html[data-theme="dark"] .after-library-heading h3{color:#f4f8ff}
html[data-theme="dark"] .after-library-heading p{color:#9db0c7}
html[data-theme="dark"] .after-library-heading span{
  background:#102e55;
  color:#8bc4ff;
  border-color:#28517f;
}

@media(max-width:1100px){
  .library-promo-section{
    direction:rtl;
    grid-template-columns:1fr;
    padding:22px;
  }
  .library-promo-video-card{
    grid-column:auto;
    order:1;
    min-height:280px;
  }
  .library-promo-copy{
    grid-column:auto;
    order:2;
  }
}
@media(max-width:700px){
  .library-promo-section{padding:16px}
  .library-promo-video-card{min-height:210px}
  .library-promo-copy h2{font-size:27px}
  .library-promo-actions{display:grid;grid-template-columns:1fr}
  .library-primary-btn,.library-secondary-btn{width:100%}
  .after-library-heading h3{font-size:20px}
}




/* =========================
   V59 — Collapsible main sidebar
   ========================= */
@media(min-width:901px){
  .sidebar{
    transition:transform .28s ease,opacity .22s ease;
    will-change:transform;
  }
  .main{
    transition:margin-right .28s ease,width .28s ease;
  }
  .mobile-menu-btn{
    display:grid!important;
    place-items:center;
    flex:0 0 42px;
    width:42px;
    height:42px;
    border:0;
    border-radius:12px;
    background:#0d4f91;
    color:#fff;
    font-size:22px;
    font-weight:900;
    cursor:pointer;
    box-shadow:0 7px 18px rgba(13,79,145,.18);
  }
  .mobile-menu-btn:hover{background:#1268b9}
  html.sidebar-collapsed .sidebar{
    transform:translateX(110%);
    opacity:0;
    pointer-events:none;
  }
  html.sidebar-collapsed .main{
    margin-right:0!important;
    width:100%!important;
  }
  html.sidebar-collapsed .topbar{
    padding-right:18px;
  }
}
html[data-theme="dark"] .mobile-menu-btn{
  background:#124b80;
  color:#fff;
}


/* V61 hero cleanup */
.hero-clean-layout{grid-template-columns:minmax(0,1.08fr) minmax(280px,.92fr);gap:26px;align-items:center}.hero-clean-layout .hero-copy{display:flex;flex-direction:column;gap:0}.hero-service-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.hero-service-tags span{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);color:#eef7ff;font-size:12px;font-weight:800;backdrop-filter:blur(8px)}.hero-visual-clean{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:210px}.hero-clean-layout .hero-video-frame{position:relative;left:auto;bottom:auto;transform:none;margin:0 auto;width:min(320px,100%);height:182px}.hero-visual-note{display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);color:#e6f2ff;font-size:12px;font-weight:800;box-shadow:0 12px 24px rgba(2,23,51,.18)}@media(max-width:1050px){.hero-clean-layout{grid-template-columns:1fr}.hero-visual-clean{order:2}.hero-clean-layout .hero-video-frame{width:min(340px,100%)}}@media(max-width:700px){.hero-service-tags{gap:6px}.hero-service-tags span{font-size:11px;padding:7px 10px}.hero-visual-note{font-size:11px;padding:8px 12px}}


/* =========================
   V62 — Bigger hero video
   ========================= */
.hero-clean-layout{
  grid-template-columns:minmax(0,1fr) minmax(360px,.95fr);
  gap:30px;
  padding:24px 28px;
}
.hero-clean-layout .hero-copy{
  max-width:760px;
}
.hero-visual-clean{
  min-height:245px;
  justify-content:center;
}
.hero-clean-layout .hero-video-frame{
  width:min(390px,100%);
  height:220px;
  border-width:7px;
  border-radius:18px 18px 10px 10px;
  box-shadow:0 22px 48px rgba(0,0,0,.34);
}
.hero-clean-layout .hero-video-screen{
  border-radius:10px;
}
.hero-visual-note{
  margin-top:2px;
  background:rgba(255,255,255,.12);
}
.hero-service-tags{
  max-width:650px;
}
@media(min-width:1350px){
  .hero-clean-layout .hero-video-frame{
    width:420px;
    height:236px;
  }
}
@media(max-width:1100px){
  .hero-clean-layout{
    grid-template-columns:1fr;
    gap:18px;
  }
  .hero-visual-clean{
    min-height:auto;
  }
  .hero-clean-layout .hero-video-frame{
    width:min(430px,100%);
    height:240px;
  }
}
@media(max-width:700px){
  .hero-clean-layout{padding:18px}
  .hero-clean-layout .hero-video-frame{
    width:min(360px,100%);
    height:202px;
  }
}


/* =========================
   V64 — Ad-free paid subscribers
   ========================= */
html.paid-ad-free [data-commercial-ad-display]{
  display:none!important;
}
html.paid-ad-free .ads-layout{
  grid-template-columns:minmax(0,760px);
  justify-content:center;
}
html.paid-ad-free .ad-submit-card{
  width:100%;
}


/* =========================
   V65 — Working articles
   ========================= */
.home-article-card{cursor:pointer;position:relative;padding-bottom:12px;transition:.2s}
.home-article-card:hover{transform:translateY(-4px);box-shadow:0 14px 30px #12315218}
.home-article-card:focus-visible{outline:3px solid #1677ff55;outline-offset:3px}
.article-read-btn{margin:0 13px;border:0;background:#eef5ff;color:#1265d4;border-radius:9px;padding:8px 11px;font-weight:900;cursor:pointer}
.articles-page-shell{max-width:1150px;margin:0 auto}
.articles-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-bottom:18px}
.articles-page-kicker{display:inline-flex;padding:7px 11px;border-radius:999px;background:#eaf3ff;color:#1265d4;font-weight:900;font-size:12px}
.articles-page-head h1{margin:8px 0 3px;font-size:34px}
.articles-page-head p{margin:0;color:#718096}
.article-back-home,.article-reader-toolbar button{border:1px solid #dce5f0;background:#fff;color:#23405f;border-radius:11px;padding:10px 13px;font-weight:900;cursor:pointer}
.articles-library-grid{display:grid;gap:14px}
.article-library-card{background:#fff;border:1px solid #e5ebf4;border-radius:18px;padding:16px;display:grid;grid-template-columns:110px 1fr;gap:16px;align-items:center;cursor:pointer;box-shadow:0 8px 22px #1231520b;transition:.2s}
.article-library-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px #12315216}
.article-library-card:focus-visible{outline:3px solid #1677ff55;outline-offset:3px}
.article-library-icon{height:105px;border-radius:15px;display:grid;place-items:center;color:#fff;font-size:32px;font-weight:900}
.article-library-card span{font-size:11px;color:#7e8b9d}
.article-library-card h2{font-size:20px;margin:5px 0 6px}
.article-library-card p{font-size:13px;color:#68778b;line-height:1.8;margin:0 0 8px}
.article-open-link{border:0;background:transparent;color:#1677ff;font-weight:900;padding:0;cursor:pointer}
.article-reader{background:#fff;border:1px solid #e3eaf3;border-radius:22px;overflow:hidden;box-shadow:0 12px 35px #12315212}
.article-reader-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 17px;border-bottom:1px solid #e8eef5;background:#fbfdff}
.article-reader-toolbar span{font-size:12px;color:#7b889b}
.article-reader-hero{height:190px;display:grid;place-items:center;font-size:72px;color:#fff;background:linear-gradient(135deg,#071f48,#1677ff)}
.article-reader-body{max-width:850px;margin:0 auto;padding:30px 28px 38px}
.article-reader-body h1{font-size:32px;line-height:1.45;margin:0 0 12px;color:#10213d}
.article-reader-lead{font-size:17px;line-height:1.9;color:#52657d;border-right:4px solid #1677ff;padding-right:14px;margin-bottom:24px}
.article-reader-content{font-size:15px;line-height:2;color:#2e425b}
.article-reader-content h2{font-size:22px;margin:26px 0 8px;color:#123d73}
.article-reader-content h3{font-size:18px;margin:20px 0 6px}
.article-reader-content p{margin:0 0 13px}
.article-reader-content ul,.article-reader-content ol{padding-right:24px;margin:8px 0 18px}
.article-reader-content li{margin:7px 0}
.article-reader-tip{background:#eef7ff;border:1px solid #cfe4ff;border-radius:14px;padding:14px 16px;margin:18px 0;color:#244f7c}
.article-reader-warning{background:#fff8df;border:1px solid #f0df9c;border-radius:14px;padding:14px 16px;margin:18px 0;color:#6c591d}
.article-reader-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:26px;padding-top:20px;border-top:1px solid #e7edf4}
.article-reader-actions button{border:0;border-radius:11px;padding:11px 15px;font-weight:900;cursor:pointer;background:#1677ff;color:#fff}
.article-reader-actions button.secondary{background:#eef5ff;color:#1265d4}
html[data-theme="dark"] .article-library-card,
html[data-theme="dark"] .article-reader{background:#0d2038;border-color:#29425f}
html[data-theme="dark"] .article-reader-toolbar{background:#10243b;border-color:#29425f}
html[data-theme="dark"] .article-reader-body h1,
html[data-theme="dark"] .article-library-card h2{color:#edf5ff}
html[data-theme="dark"] .article-reader-content{color:#c6d3e1}
html[data-theme="dark"] .article-reader-content h2{color:#8fc4ff}
html[data-theme="dark"] .article-reader-lead,
html[data-theme="dark"] .article-library-card p{color:#a9b8ca}
@media(max-width:700px){
  .article-library-card{grid-template-columns:1fr}
  .article-library-icon{height:100px}
  .article-reader-body{padding:22px 17px 30px}
  .article-reader-body h1{font-size:26px}
  .article-reader-hero{height:135px;font-size:54px}
}


/* =========================
   V67 — Live community
   ========================= */
.home-latest-posts{display:grid}
.home-community-post{
  padding:12px 0;border-top:1px solid #edf1f6;cursor:pointer;transition:.18s
}
.home-community-post:first-child{border-top:0}
.home-community-post:hover{padding-right:5px}
.home-community-post-head{display:flex;justify-content:space-between;gap:8px;align-items:center}
.home-community-post strong{font-size:13px;color:#18324f}
.home-community-post time{font-size:10px;color:#8794a5}
.home-community-post p{font-size:12px;line-height:1.75;margin:6px 0;color:#526177;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.home-community-post-meta{display:flex;gap:14px;color:#607087;font-size:11px;font-weight:800}
.community-loading{color:#8390a1;font-size:12px;padding:14px 0}
.community-loading.compact{padding:10px 0}

.community-page{max-width:980px;margin:0 auto}
.community-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-bottom:16px}
.community-kicker{display:inline-flex;background:#eef5ff;color:#1265d4;border:1px solid #d7e8ff;padding:7px 11px;border-radius:999px;font-size:12px;font-weight:900}
.community-page-head h1{font-size:34px;margin:8px 0 3px}
.community-page-head p{margin:0;color:#74839a}
.community-refresh-btn{border:1px solid #dce5f0;background:#fff;color:#23405f;border-radius:11px;padding:10px 14px;font-weight:900;cursor:pointer}

.community-composer-card{
  background:#fff;border:1px solid #e3eaf3;border-radius:18px;padding:16px;
  display:grid;grid-template-columns:48px 1fr;gap:12px;box-shadow:0 8px 24px #1231520b;margin-bottom:16px
}
.community-composer-avatar{
  width:48px;height:48px;border-radius:15px;background:linear-gradient(135deg,#1677ff,#14a3df);
  color:#fff;display:grid;place-items:center;font-size:22px
}
.community-composer-main textarea{
  width:100%;resize:vertical;min-height:86px;max-height:220px;border:1px solid #dce5f0;border-radius:13px;
  padding:12px 13px;font-family:inherit;outline:none;background:#fbfdff
}
.community-composer-main textarea:focus{border-color:#6ca7f6;box-shadow:0 0 0 3px #1677ff12}
.community-composer-foot{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:9px}
.community-composer-foot span{font-size:11px;color:#7b899c}
.community-composer-foot button{
  border:0;background:linear-gradient(135deg,#1677ff,#14a3df);color:#fff;border-radius:11px;
  padding:10px 16px;font-weight:900;cursor:pointer
}
.community-composer-foot button:disabled{opacity:.55;cursor:not-allowed}
.community-feed-status{font-size:12px;color:#7f8da0;margin:8px 2px}
.community-feed{display:grid;gap:12px}
.community-post-card{
  background:#fff;border:1px solid #e3eaf3;border-radius:18px;padding:16px;box-shadow:0 8px 24px #1231520b
}
.community-post-card.highlight{animation:communityHighlight 1.8s ease}
@keyframes communityHighlight{0%,100%{box-shadow:0 8px 24px #1231520b}35%{box-shadow:0 0 0 4px #1677ff30,0 15px 36px #1677ff22}}
.community-post-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.community-author{display:flex;align-items:center;gap:10px}
.community-author-avatar{
  width:40px;height:40px;border-radius:50%;display:grid;place-items:center;
  background:linear-gradient(135deg,#0d3e75,#178cff);color:#fff;font-weight:900
}
.community-author strong,.community-author time{display:block}
.community-author strong{font-size:14px}
.community-author time{font-size:10px;color:#8a97a8;margin-top:2px}
.community-delete-btn{border:0;background:#fff1f3;color:#b4233a;border-radius:9px;padding:7px 9px;cursor:pointer;font-size:11px;font-weight:900}
.community-post-content{font-size:14px;line-height:1.95;color:#34475f;margin:14px 0;white-space:pre-wrap;word-break:break-word}
.community-post-actions{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid #edf1f6;padding-top:10px}
.community-post-actions button{
  border:1px solid #e1e8f0;background:#f8fbff;color:#456079;border-radius:10px;padding:8px 11px;font-weight:800;cursor:pointer
}
.community-post-actions button.liked{background:#fff0f3;color:#c12448;border-color:#f6c7d3}
.community-comments-panel{margin-top:12px;padding-top:12px;border-top:1px dashed #dce5ef}
.community-comments-list{display:grid;gap:8px;margin-bottom:10px}
.community-comment{
  background:#f6f9fd;border-radius:12px;padding:9px 11px
}
.community-comment-head{display:flex;justify-content:space-between;gap:10px;margin-bottom:3px}
.community-comment-head strong{font-size:12px}
.community-comment-head time{font-size:9px;color:#8b97a7}
.community-comment p{font-size:12px;line-height:1.7;margin:0;color:#4d6078;white-space:pre-wrap}
.community-comment-form{display:grid;grid-template-columns:1fr auto;gap:8px}
.community-comment-form input{border:1px solid #dce5ef;border-radius:10px;padding:9px 11px;outline:none}
.community-comment-form button{border:0;background:#1677ff;color:#fff;border-radius:10px;padding:0 14px;font-weight:900;cursor:pointer}
.community-empty{background:#fff;border:1px dashed #cfd9e6;border-radius:16px;padding:28px;text-align:center;color:#74839a}

html[data-theme="dark"] .community-composer-card,
html[data-theme="dark"] .community-post-card{background:#0d2038;border-color:#29425f}
html[data-theme="dark"] .community-composer-main textarea,
html[data-theme="dark"] .community-comment-form input{background:#10243b;color:#fff;border-color:#355373}
html[data-theme="dark"] .community-post-content{color:#d3deea}
html[data-theme="dark"] .community-post-actions{border-color:#29425f}
html[data-theme="dark"] .community-post-actions button{background:#10243b;color:#c7d6e7;border-color:#355373}
html[data-theme="dark"] .community-comment{background:#10243b}
html[data-theme="dark"] .community-comment p{color:#c0cede}

@media(max-width:620px){
  .community-composer-card{grid-template-columns:1fr}
  .community-composer-avatar{display:none}
  .community-composer-foot{align-items:stretch;flex-direction:column}
  .community-composer-foot button{width:100%}
  .community-comment-form{grid-template-columns:1fr}
  .community-comment-form button{min-height:42px}
}


/* =========================
   V68 — Live support chat
   ========================= */
.live-support-shell{max-width:1120px;margin:0 auto}
.live-support-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-bottom:18px}
.live-support-head h1{font-size:34px;margin:8px 0 4px}
.live-support-head p{margin:0;color:#718096}
.live-support-kicker{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:999px;background:#ecfff5;border:1px solid #c6f2d8;color:#137747;font-size:12px;font-weight:900}
.live-support-kicker i,.live-chat-top span i{width:8px;height:8px;border-radius:50%;background:#20b86a;box-shadow:0 0 0 4px #20b86a20;display:inline-block}
.live-support-whatsapp{text-decoration:none;background:#14ad63;color:#fff;border-radius:11px;padding:10px 14px;font-weight:900}
.live-support-guest{background:#fff;border:1px solid #e3eaf3;border-radius:22px;padding:50px 25px;text-align:center;box-shadow:0 10px 30px #1231520c}
.live-support-guest-icon{font-size:48px}
.live-support-guest h2{margin:10px 0 6px}
.live-support-guest p{color:#718096}
.live-support-guest button{border:0;background:#1677ff;color:#fff;border-radius:12px;padding:11px 20px;font-weight:900;cursor:pointer}
.live-chat-card{background:#fff;border:1px solid #e3eaf3;border-radius:20px;overflow:hidden;box-shadow:0 10px 32px #1231520c}
.live-chat-top{padding:14px 17px;border-bottom:1px solid #e8eef5;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fbfdff}
.live-chat-top strong,.live-chat-top span{display:block}
.live-chat-top span{font-size:11px;color:#698099;margin-top:3px}
.live-chat-top span i{margin-left:5px;width:7px;height:7px}
.live-chat-top button,.support-admin-inbox-head button{border:1px solid #dce5ef;background:#fff;border-radius:9px;width:36px;height:36px;cursor:pointer;font-weight:900}
.live-chat-messages{height:430px;overflow-y:auto;padding:18px;background:linear-gradient(180deg,#f8fbff,#f3f7fc);display:flex;flex-direction:column;gap:10px}
.live-chat-loading{margin:auto;color:#8492a6;font-size:12px}
.live-chat-bubble-wrap{display:flex;flex-direction:column;max-width:78%}
.live-chat-bubble-wrap.mine{align-self:flex-start;align-items:flex-start}
.live-chat-bubble-wrap.theirs{align-self:flex-end;align-items:flex-end}
.live-chat-bubble{padding:10px 13px;border-radius:15px;font-size:13px;line-height:1.8;white-space:pre-wrap;word-break:break-word;box-shadow:0 4px 12px #10213d0b}
.live-chat-bubble-wrap.mine .live-chat-bubble{background:#1677ff;color:#fff;border-bottom-left-radius:5px}
.live-chat-bubble-wrap.theirs .live-chat-bubble{background:#fff;color:#2a405c;border:1px solid #e2e9f1;border-bottom-right-radius:5px}
.live-chat-meta{display:flex;gap:7px;align-items:center;margin:4px 4px 0;font-size:9px;color:#8794a5}
.live-chat-type{padding:2px 6px;border-radius:999px;background:#eaf3ff;color:#1265d4;font-weight:900}
.live-chat-compose{padding:14px 16px;background:#fff;border-top:1px solid #e7edf4}
.live-chat-compose-row{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:8px}
.live-chat-compose-row select{border:1px solid #dce5ef;background:#f8fbff;border-radius:9px;padding:8px 10px;font-family:inherit}
.live-chat-compose-row small{color:#8a97a8}
.live-chat-compose textarea{width:100%;resize:vertical;max-height:180px;border:1px solid #dce5ef;border-radius:12px;padding:11px 12px;font-family:inherit;outline:none}
.live-chat-compose textarea:focus{border-color:#6aa7f5;box-shadow:0 0 0 3px #1677ff10}
.live-chat-compose-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:9px}
.live-chat-compose-foot span{font-size:10px;color:#7a899b}
.live-chat-compose-foot button{border:0;background:linear-gradient(135deg,#1677ff,#13a0df);color:#fff;border-radius:11px;padding:10px 16px;font-weight:900;cursor:pointer}
.live-chat-compose-foot button:disabled{opacity:.55;cursor:not-allowed}
.live-support-admin-area{display:grid;grid-template-columns:310px minmax(0,1fr);gap:14px;min-height:610px}
.support-admin-inbox,.support-admin-chat{background:#fff;border:1px solid #e3eaf3;border-radius:20px;overflow:hidden;box-shadow:0 10px 30px #1231520b}
.support-admin-inbox-head{padding:14px;border-bottom:1px solid #e7edf4;display:flex;justify-content:space-between;align-items:center}
.support-admin-inbox-head strong,.support-admin-inbox-head span{display:block}
.support-admin-inbox-head span{font-size:10px;color:#8390a1;margin-top:2px}
.support-admin-threads{height:550px;overflow-y:auto}
.support-thread{width:100%;border:0;border-bottom:1px solid #edf1f6;background:#fff;text-align:right;padding:12px 13px;cursor:pointer;display:grid;gap:5px}
.support-thread:hover,.support-thread.active{background:#f0f6ff}
.support-thread-top{display:flex;justify-content:space-between;gap:8px;align-items:center}
.support-thread strong{font-size:12px;color:#1f3957;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.support-thread time{font-size:9px;color:#8a97a8;white-space:nowrap}
.support-thread-preview{font-size:10px;color:#758399;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.support-thread-bottom{display:flex;justify-content:space-between;gap:7px;align-items:center}
.support-thread-type{font-size:9px;padding:2px 6px;border-radius:999px;background:#eef5ff;color:#1265d4}
.support-thread-unread{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#e12648;color:#fff;display:grid;place-items:center;font-size:9px;font-weight:900}
.support-admin-empty{height:100%;min-height:600px;display:grid;place-content:center;text-align:center;padding:25px;color:#7c8999}
.support-admin-empty span{font-size:48px}
.support-admin-empty h3{margin:7px 0}
.support-admin-empty p{max-width:360px;margin:0}
.support-admin-conversation-head{padding:14px 16px;border-bottom:1px solid #e7edf4;background:#fbfdff}
.support-admin-conversation-head strong,.support-admin-conversation-head span{display:block}
.support-admin-conversation-head span{font-size:10px;color:#8492a6;margin-top:2px}
.admin-messages{height:430px}
.admin-compose{border-radius:0}
html[data-theme="dark"] .live-chat-card,
html[data-theme="dark"] .live-support-guest,
html[data-theme="dark"] .support-admin-inbox,
html[data-theme="dark"] .support-admin-chat{background:#0d2038;border-color:#29425f}
html[data-theme="dark"] .live-chat-top,
html[data-theme="dark"] .support-admin-conversation-head{background:#10243b;border-color:#29425f}
html[data-theme="dark"] .live-chat-messages{background:linear-gradient(180deg,#0a1a2d,#0d2038)}
html[data-theme="dark"] .live-chat-bubble-wrap.theirs .live-chat-bubble{background:#122b46;color:#d7e3ef;border-color:#355373}
html[data-theme="dark"] .live-chat-compose{background:#0d2038;border-color:#29425f}
html[data-theme="dark"] .live-chat-compose textarea,
html[data-theme="dark"] .live-chat-compose-row select{background:#10243b;color:#fff;border-color:#355373}
html[data-theme="dark"] .support-thread{background:#0d2038;border-color:#29425f;color:#fff}
html[data-theme="dark"] .support-thread:hover,
html[data-theme="dark"] .support-thread.active{background:#14304e}
html[data-theme="dark"] .support-thread strong{color:#e5effa}
@media(max-width:850px){
  .live-support-admin-area{grid-template-columns:1fr}
  .support-admin-threads{height:260px}
  .support-admin-empty{min-height:300px}
}
@media(max-width:620px){
  .live-chat-messages{height:390px;padding:12px}
  .live-chat-bubble-wrap{max-width:90%}
  .live-chat-compose-foot{flex-direction:column;align-items:stretch}
  .live-chat-compose-foot button{width:100%}
  .live-chat-compose-row{align-items:stretch;flex-direction:column}
}


/* V75: guest access protection */
.guest-mode .nav-item[data-page="pdf"]::after,
.guest-mode .nav-item[data-page="ai"]::after,
.guest-mode .nav-item[data-page="admin"]::after,
.guest-mode .nav-item[data-page="school"]::after,
.guest-mode .nav-item[data-page="teacher"]::after,
.guest-mode .nav-item[data-page="library"]::after,
.guest-mode .nav-item[data-page="images"]::after,
.guest-mode .nav-item[data-page="docs"]::after,
.guest-mode .nav-item[data-page="tools"]::after,
.guest-mode .nav-item[data-page="community"]::after,
.guest-mode .nav-item[data-page="livechat"]::after,
.guest-mode .nav-item[data-page="favorites"]::after { content:" 🔒"; font-size:.78em; opacity:.9; }


/* V76 — delete unsubscribed users */
.action-delete-user{
  border:1px solid #f2b8c2!important;
  background:#fff0f3!important;
  color:#b4233a!important;
  font-weight:900!important;
}
.action-delete-user:hover{
  background:#ffe1e7!important;
  border-color:#e98fa1!important;
}
html[data-theme="dark"] .action-delete-user{
  background:#3a1720!important;
  color:#ffb6c3!important;
  border-color:#6f3140!important;
}

/* V81 — direct image selection + clearer selection state */
.image-result-thumb{position:relative;width:100%;border:0;padding:0;cursor:pointer;font:inherit;text-align:inherit}
.image-result-thumb.active{box-shadow:inset 0 0 0 4px #2563eb}
.image-result-card.is-selected{border-color:#2563eb;box-shadow:0 10px 28px rgba(37,99,235,.16)}
.image-thumb-select-badge{position:absolute;left:10px;bottom:10px;background:rgba(8,31,99,.9);color:#fff;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:900;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.15)}
.image-result-thumb.active .image-thumb-select-badge{background:#16a34a}

/* =========================
   DIGITAL LIBRARY RESEARCH - V82
   ========================= */
.digital-library-page{position:relative;min-height:calc(100vh - 120px);padding:18px;border-radius:22px;overflow:hidden;background:#080d17;color:#eef5ff}
.digital-library-page:before,.digital-library-page:after{content:"";position:absolute;inset:0;pointer-events:none}
.digital-library-page:before{background-image:radial-gradient(circle at 8% 18%,#2e75ff 0 1px,transparent 1.6px),radial-gradient(circle at 22% 72%,#2e75ff 0 1px,transparent 1.6px),radial-gradient(circle at 66% 25%,#2e75ff 0 1px,transparent 1.6px),radial-gradient(circle at 91% 62%,#2e75ff 0 1px,transparent 1.6px);background-size:220px 180px,280px 230px,260px 210px,320px 260px;opacity:.45}
.digital-library-page:after{background:radial-gradient(circle at 18% 20%,#174b9528,transparent 30%),radial-gradient(circle at 82% 78%,#153b7620,transparent 28%)}
.digital-library-page>*{position:relative;z-index:1}
.digital-library-topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:6px 6px 18px}
.digital-library-topbar h1{margin:5px 0 5px;font-size:27px;color:#fff}.digital-library-topbar p{margin:0;color:#9fb0c6;max-width:900px;line-height:1.8}.digital-library-kicker{color:#5ca1ff;font-size:12px;font-weight:900;letter-spacing:.06em}
.digital-library-shell{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:28px;align-items:start;direction:ltr}
.research-preview-zone,.research-builder-panel{direction:rtl}
.research-preview-zone{min-width:0}.research-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 auto 10px;width:min(820px,100%);color:#c6d3e4}.research-preview-toolbar strong{display:block;color:#fff}.research-preview-toolbar small{display:block;color:#75889f;margin-top:2px}
.school-research-paper{width:min(820px,100%);min-height:980px;margin:0 auto;background:#fff;color:#111;padding:56px 58px;box-shadow:0 18px 70px #0007;overflow:hidden;font-family:"Cairo",Arial,sans-serif;line-height:2;border-radius:2px}
.school-research-placeholder{min-height:780px;display:grid;place-content:center;text-align:center;color:#a6b6c9}.school-placeholder-icon{font-size:74px;color:#a6c7fa;line-height:1;margin-bottom:16px}.school-research-placeholder strong{font-size:20px;color:#91a5bf}.school-research-placeholder p{margin:6px 0 0;color:#aebaca}
.school-research-document{outline:none}.school-research-document h1{text-align:center;font-size:26px;margin:0 0 12px;color:#111}.school-research-document .research-doc-meta{text-align:center;color:#6b7280;font-size:12px;border-bottom:1px solid #e5e7eb;padding-bottom:15px;margin-bottom:22px}.school-research-document h2{font-size:18px;color:#174d91;margin:22px 0 7px}.school-research-document p{font-size:14px;line-height:2;text-align:justify;margin:0 0 12px}.school-research-document .research-doc-images{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0 24px;break-inside:avoid}.school-research-document .research-doc-images figure{margin:0;border:1px solid #e5e7eb;border-radius:8px;overflow:hidden;background:#f8fafc}.school-research-document .research-doc-images img{display:block;width:100%;height:200px;object-fit:cover}.school-research-document .research-doc-images figcaption{font-size:10px;color:#64748b;padding:6px 8px;line-height:1.5}.school-research-document .research-doc-sources{font-size:11px;color:#475569;margin-top:20px;border-top:1px solid #e5e7eb;padding-top:12px}.school-research-document .research-doc-sources a{color:#1d5fae;word-break:break-word}
.research-builder-panel{position:sticky;top:88px;background:#17191e;border:1px solid #30343d;border-radius:18px;padding:20px;box-shadow:0 18px 60px #0005;min-height:640px}.research-builder-brand{display:flex;align-items:center;gap:10px;padding-bottom:14px;border-bottom:1px solid #2c3037;margin-bottom:16px}.research-builder-brand>span{font-size:30px}.research-builder-brand strong{display:block;color:#4b91ff;font-size:19px}.research-builder-brand small{display:block;color:#8f9baa;margin-top:2px;font-size:11px}
.research-control-group{display:block;margin:15px 0}.research-control-label{display:block;color:#ccd5e0;font-size:12px;margin-bottom:8px}.research-language-tabs{display:grid;grid-template-columns:repeat(3,1fr);background:#2a2d32;border-radius:12px;padding:4px;gap:4px}.research-language-tabs button{border:0;background:transparent;color:#aeb7c2;padding:8px;border-radius:9px;font-size:11px;font-weight:800}.research-language-tabs button.active{background:#3d83ed;color:white;box-shadow:0 4px 14px #2871e844}
.research-topic-input,.research-settings select{width:100%;border:1px solid #41464f;background:#2c2e32;color:#fff;border-radius:11px;padding:11px 12px;outline:none}.research-topic-input::placeholder{color:#858c95}.research-topic-input:focus,.research-settings select:focus{border-color:#458cff;box-shadow:0 0 0 3px #458cff22}
.research-length-stack{display:grid;gap:8px}.research-length-stack button{border:1px solid #292c31;background:#202226;color:#fff;border-radius:11px;padding:11px 12px;text-align:right;font-weight:800}.research-length-stack button.active{background:#347ff1;border-color:#4d91f7;box-shadow:0 7px 20px #1d69da35}
.research-settings{border:1px solid #373b42;border-radius:11px;background:#25272b;margin:15px 0}.research-settings summary{cursor:pointer;padding:11px 12px;color:#aeb8c5;font-size:12px}.research-settings-body{display:grid;gap:12px;padding:0 12px 12px}.research-settings-body label{display:grid;gap:6px;color:#b9c2cf;font-size:11px}.research-check-row{display:flex!important;align-items:center;gap:8px!important}.research-check-row input{accent-color:#4285f4}
.research-generate-btn,.research-web-btn{width:100%;border:0;border-radius:12px;padding:13px;font-weight:900}.research-generate-btn{background:linear-gradient(135deg,#3283f5,#4c94ff);color:#fff;box-shadow:0 10px 30px #2a7bef30}.research-web-btn{margin-top:8px;background:#25282d;color:#b9c5d4;border:1px solid #373b42}
.research-export-area{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:20px;padding-top:16px;border-top:1px solid #2d3137}.research-export-area button{border:1px solid #343941;background:#25282d;color:#cbd5e1;border-radius:11px;padding:10px;font-size:11px;font-weight:800}.research-export-area button:hover{border-color:#4b8ff6;color:#fff}.research-export-area .danger{grid-column:1/-1;color:#fca5a5}
.research-sources-drawer{margin-top:24px;background:#111722cc;border:1px solid #273244;border-radius:16px;padding:16px;color:#e6edf7}.research-sources-drawer .school-sources-list{max-height:310px}.research-sources-drawer .school-source-card{background:#171e2a;border-color:#2d394a;color:#dce6f2}.research-sources-drawer .school-source-card h3{color:#fff}.research-sources-drawer .school-source-card p,.research-sources-drawer .school-source-meta{color:#8fa0b5}.research-sources-drawer .school-source-meta a{color:#62a3ff}
.digital-library-page .school-live-note{background:#171e2a;border-color:#374359;color:#bdc7d4}.digital-library-page .school-live-status.idle{background:#27303b;color:#aab6c4}.digital-library-page .school-live-status.loading{background:#463b17;color:#ffd66b}.digital-library-page .school-live-status.success{background:#173f2d;color:#6ee7a8}.digital-library-page .school-live-status.error{background:#492029;color:#ff9eae}
@media(max-width:1150px){.digital-library-shell{grid-template-columns:1fr}.research-builder-panel{position:static;max-width:820px;width:100%;margin:auto}.research-preview-zone{order:2}.research-builder-panel{order:1}}
@media(max-width:700px){.digital-library-page{padding:10px}.digital-library-topbar{flex-direction:column}.school-research-paper{min-height:720px;padding:32px 22px}.school-research-document .research-doc-images{grid-template-columns:1fr}.school-research-document .research-doc-images img{height:180px}.research-export-area{grid-template-columns:1fr}.research-export-area .danger{grid-column:auto}}


.research-focus-pulse{box-shadow:0 0 0 3px rgba(59,130,246,.18), 0 18px 40px rgba(15,23,42,.18)!important; border-radius:28px; transition:box-shadow .25s ease;}

/* =========================
   CV AI BUILDER - V84
   ========================= */
.nav-free-badge{margin-inline-start:auto;background:#eafaf0;color:#08783e;border:1px solid #bfe7cf;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:900}
.cvai-service{position:relative;overflow:hidden}
.cvai-service .service-icon{background:linear-gradient(135deg,#0f5ca8,#2d8cff);color:#fff;font-weight:900}
.service-free-chip{position:absolute;top:12px;left:12px;background:#eafaf0;color:#08783e;border:1px solid #bfe7cf;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:900}
.cvai-page{padding:8px 4px 40px}
.cvai-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:28px;border-radius:28px;background:linear-gradient(135deg,#071a3a,#0d3f78 60%,#1262ae);color:#fff;box-shadow:0 20px 50px rgba(7,26,58,.18);margin-bottom:18px;overflow:hidden;position:relative}
.cvai-hero:before{content:"";position:absolute;width:340px;height:340px;border-radius:50%;background:rgba(255,255,255,.07);left:-100px;top:-160px}
.cvai-hero>div{position:relative;z-index:1}.cvai-kicker-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.cvai-kicker{font-size:12px;font-weight:900;letter-spacing:.8px;color:#b9dcff}.cvai-free-badge{background:#e8fff1;color:#08783e;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900}.cvai-hero h1{margin:10px 0 8px;font-size:34px}.cvai-hero p{margin:0;max-width:860px;line-height:1.9;color:#e4efff}.cvai-hero-pills{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.cvai-hero-pills span{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);padding:7px 10px;border-radius:999px;font-size:12px;font-weight:800}.cvai-hero-mark{width:120px;height:120px;min-width:120px;border-radius:30px;background:#fff;color:#0d3f78;display:grid;place-items:center;font-size:38px;font-weight:1000;box-shadow:0 16px 40px rgba(0,0,0,.16);transform:rotate(-4deg)}.cvai-hero-mark span{font-size:15px;color:#2d8cff;margin-inline-start:3px}
.cvai-template-section,.cvai-form-card,.cvai-preview-shell{background:#fff;border:1px solid #e4eaf3;border-radius:24px;box-shadow:0 12px 36px rgba(18,48,89,.07)}
.cvai-template-section{padding:20px;margin-bottom:18px}.cvai-section-head,.cvai-form-head,.cvai-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.cvai-section-head h2,.cvai-form-head h2{margin:0 0 4px}.cvai-section-head p,.cvai-form-head p{margin:0;color:#7b8698}.cvai-count-chip{background:#eef6ff;color:#0f5ca8;border:1px solid #d7e8ff;border-radius:999px;padding:7px 11px;font-weight:900;font-size:12px}
.cvai-template-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px;margin-top:16px}.cv-template-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:8px;text-align:center;transition:.18s;min-width:0}.cv-template-card:hover{transform:translateY(-2px);box-shadow:0 9px 22px rgba(18,48,89,.1)}.cv-template-card.active{border-color:#2d8cff;box-shadow:0 0 0 3px rgba(45,140,255,.12)}.cv-template-card strong{display:block;font-size:12px;margin-top:6px}.cv-template-card small{display:block;color:#8b96a8;font-size:10px;margin-top:2px}.cv-mini{height:78px;border-radius:9px;background:#f8fafc;border:1px solid #e4e8ef;position:relative;overflow:hidden}.cv-mini:before{content:"";position:absolute;top:0;right:0;left:0;height:18px;background:#1f6fc4}.cv-mini i{position:absolute;width:13px;height:13px;border-radius:50%;top:3px;right:6px;background:#fff}.cv-mini b{position:absolute;height:4px;border-radius:9px;background:#cfd8e6;left:7px;right:7px}.cv-mini b:nth-of-type(1){top:30px}.cv-mini b:nth-of-type(2){top:41px;right:20px}.cv-mini em{position:absolute;width:34%;right:7px;bottom:8px;top:51px;background:#e7edf6;border-radius:4px}.cv-mini.navy:before{background:#0b2545}.cv-mini.emerald:before{background:#0d7a61}.cv-mini.burgundy:before{background:#8a2740}.cv-mini.graphite:before{background:#3e4650}.cv-mini.gold:before{background:#9d7b33}.cv-mini.minimal:before{background:#fff;border-bottom:2px solid #111}.cv-mini.modern:before{background:#214fd6}.cv-mini.academic:before{background:#5b4335}.cv-mini.tech:before{background:#172033}.cv-mini.purple:before{background:#6c42c9}.cv-mini.orange:before{background:#df6b22}.cv-mini.student:before{background:#2f78b7}.cv-mini.sales:before{background:#0b8a8f}.cv-mini.bilingual:before{background:linear-gradient(90deg,#1d5da8 0 50%,#c93145 50%)}.cv-mini.mono:before{background:#111}
.cvai-builder-layout{display:grid;grid-template-columns:minmax(360px,.92fr) minmax(520px,1.08fr);gap:18px;align-items:start}.cvai-form-card{padding:20px}.cvai-small-btn{border:1px solid #d9e2ef;background:#f5f8fc;color:#30537b;border-radius:11px;padding:8px 10px;font-weight:800}.cvai-small-btn.ghost{background:#fff;color:#8a3e4b}.cvai-photo-row{display:flex;align-items:center;gap:14px;padding:14px;border:1px dashed #d8e1ed;background:#fbfdff;border-radius:16px;margin:16px 0}.cvai-photo-preview{width:72px;height:72px;border-radius:18px;background:#eef3fa;display:grid;place-items:center;overflow:hidden;font-size:28px}.cvai-photo-preview img{width:100%;height:100%;object-fit:cover}.cvai-photo-row p{margin:3px 0 8px;color:#8a94a6;font-size:12px}.cvai-grid{display:grid;gap:10px}.cvai-grid.two{grid-template-columns:1fr 1fr}.cvai-grid label,.cvai-field{display:grid;gap:6px;font-size:12px;font-weight:900;color:#38465a}.cvai-grid input,.cvai-grid select,.cvai-field textarea{width:100%;border:1px solid #dde4ee;background:#fff;border-radius:12px;padding:11px 12px;outline:none;color:#1f2937}.cvai-grid input:focus,.cvai-grid select:focus,.cvai-field textarea:focus{border-color:#7db7ff;box-shadow:0 0 0 3px rgba(45,140,255,.1)}.cvai-field{margin-top:11px}.cvai-field textarea{resize:vertical;line-height:1.65}.cvai-smart-actions,.cvai-form-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.cvai-ai-btn{border:none;border-radius:12px;padding:10px 13px;background:linear-gradient(135deg,#194d9c,#2d8cff);color:#fff;font-weight:900}.cvai-ai-btn.free{background:#eafaf0;color:#08783e;border:1px solid #bfe7cf}.cvai-secondary-btn,.cvai-danger-btn{border:none;border-radius:12px;padding:10px 13px;font-weight:900}.cvai-secondary-btn{background:#edf3ff;color:#174da0}.cvai-danger-btn{background:#fff0f2;color:#b4233a}
.cvai-preview-shell{position:sticky;top:14px;overflow:hidden}.cvai-preview-toolbar{padding:14px 16px;border-bottom:1px solid #e7edf5;background:#fbfcff}.cvai-preview-toolbar>div:first-child{display:grid;gap:2px}.cvai-preview-toolbar span{font-size:11px;color:#7b8698}.cvai-preview-toolbar>div:last-child{display:flex;gap:7px;flex-wrap:wrap}.cvai-preview-toolbar button{border:1px solid #dce4ee;background:#fff;border-radius:10px;padding:8px 10px;font-weight:900;color:#30445d}.cvai-paper-wrap{padding:22px;background:#e9eef5;overflow:auto;max-height:calc(100vh - 165px)}.cv-paper{--cv-accent:#1f6fc4;--cv-accent-soft:#eaf3ff;--cv-head:#0f355f;--cv-side:#f5f8fc;width:210mm;min-height:297mm;max-width:100%;margin:auto;background:#fff;color:#1e293b;box-shadow:0 12px 36px rgba(22,38,63,.16);font-family:"Cairo",Arial,sans-serif;overflow:hidden}.cv-head{display:flex;align-items:center;gap:18px;padding:26px 30px;background:var(--cv-head);color:#fff}.cv-head-photo{width:92px;height:92px;min-width:92px;border-radius:18px;background:rgba(255,255,255,.16);display:grid;place-items:center;overflow:hidden;font-size:34px;border:3px solid rgba(255,255,255,.7)}.cv-head-photo img{width:100%;height:100%;object-fit:cover}.cv-head-copy{min-width:0}.cv-head h1{font-size:28px;margin:0;line-height:1.3}.cv-head h2{font-size:15px;margin:4px 0 9px;font-weight:700;color:#dbeafe}.cv-contact{display:flex;gap:8px 14px;flex-wrap:wrap;font-size:10.5px;opacity:.95}.cv-body{display:grid;grid-template-columns:1.65fr .75fr;min-height:230mm}.cv-main{padding:28px 26px}.cv-side{padding:28px 18px;background:var(--cv-side);border-inline-start:1px solid #e6ebf2}.cv-section{margin-bottom:23px}.cv-section h3{margin:0 0 10px;font-size:14px;color:var(--cv-accent);padding-bottom:6px;border-bottom:2px solid var(--cv-accent-soft)}.cv-section p{font-size:11px;line-height:1.9;margin:0;color:#445164;white-space:pre-line}.cv-rich-lines{display:grid;gap:8px}.cv-rich-lines p{border-inline-start:3px solid var(--cv-accent);padding-inline-start:10px}.cv-tags{display:flex;flex-wrap:wrap;gap:6px}.cv-tags span{background:var(--cv-accent-soft);color:var(--cv-accent);border-radius:999px;padding:5px 8px;font-size:9.5px;font-weight:900}.cv-side-lines{display:grid;gap:6px}.cv-side-lines p{font-size:10px}.cvai-status{padding:11px 15px;border-top:1px solid #e7edf5;background:#fff;color:#68758a;font-size:12px}
.cv-template-navy{--cv-accent:#0b3c6f;--cv-accent-soft:#eaf1f8;--cv-head:#071e35;--cv-side:#f3f6f9}.cv-template-emerald{--cv-accent:#0d7a61;--cv-accent-soft:#e7f7f2;--cv-head:#0a5545;--cv-side:#f0faf7}.cv-template-burgundy{--cv-accent:#8a2740;--cv-accent-soft:#fbeef1;--cv-head:#5d172a;--cv-side:#fcf5f7}.cv-template-graphite{--cv-accent:#48515d;--cv-accent-soft:#edf0f3;--cv-head:#292f36;--cv-side:#f5f6f7}.cv-template-gold{--cv-accent:#8d6a1f;--cv-accent-soft:#fbf5e7;--cv-head:#3c3423;--cv-side:#fbf9f4}.cv-template-minimal{--cv-accent:#111;--cv-accent-soft:#f3f3f3;--cv-head:#fff;--cv-side:#fff;border:1px solid #ddd}.cv-template-minimal .cv-head{color:#111;border-bottom:3px solid #111}.cv-template-minimal .cv-head h2{color:#555}.cv-template-minimal .cv-head-photo{border-color:#ddd;background:#f6f6f6}.cv-template-modern{--cv-accent:#214fd6;--cv-accent-soft:#eaf0ff;--cv-head:linear-gradient(135deg,#16338c,#2e67f0);--cv-side:#f5f7ff}.cv-template-academic{--cv-accent:#5b4335;--cv-accent-soft:#f2ece8;--cv-head:#48352b;--cv-side:#faf7f5}.cv-template-tech{--cv-accent:#2c72ff;--cv-accent-soft:#e9f0ff;--cv-head:#111827;--cv-side:#f3f5f8}.cv-template-purple{--cv-accent:#6c42c9;--cv-accent-soft:#f0eaff;--cv-head:#46258e;--cv-side:#f8f5ff}.cv-template-orange{--cv-accent:#cf5d18;--cv-accent-soft:#fff0e6;--cv-head:#873c12;--cv-side:#fff8f3}.cv-template-student{--cv-accent:#2f78b7;--cv-accent-soft:#e9f4fd;--cv-head:#225a89;--cv-side:#f6fbff}.cv-template-sales{--cv-accent:#0b8a8f;--cv-accent-soft:#e6f7f7;--cv-head:#075d61;--cv-side:#f2fbfb}.cv-template-bilingual{--cv-accent:#1d5da8;--cv-accent-soft:#eaf2fb;--cv-head:linear-gradient(90deg,#164a88 0 55%,#a72538 55%);--cv-side:#f8f9fc}.cv-template-mono{--cv-accent:#111;--cv-accent-soft:#eee;--cv-head:#111;--cv-side:#f4f4f4;filter:grayscale(1)}
.cv-template-modern .cv-body,.cv-template-tech .cv-body{grid-template-columns:.78fr 1.62fr}.cv-template-modern .cv-main,.cv-template-tech .cv-main{order:2}.cv-template-modern .cv-side,.cv-template-tech .cv-side{order:1;border-inline-start:0;border-inline-end:1px solid #e6ebf2}.cv-template-academic .cv-head-photo,.cv-template-minimal .cv-head-photo,.cv-template-mono .cv-head-photo{border-radius:50%}.cv-template-student .cv-head{padding-top:20px;padding-bottom:20px}
@media(max-width:1400px){.cvai-template-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.cvai-builder-layout{grid-template-columns:1fr}.cvai-preview-shell{position:static}.cvai-paper-wrap{max-height:none}}
@media(max-width:900px){.cvai-hero{padding:20px}.cvai-hero h1{font-size:27px}.cvai-hero-mark{display:none}.cvai-template-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.cvai-grid.two{grid-template-columns:1fr}.cvai-paper-wrap{padding:10px}.cv-paper{width:100%;min-height:auto}.cv-head{padding:18px}.cv-head-photo{width:72px;height:72px;min-width:72px}.cv-body{grid-template-columns:1fr}.cv-side{border-inline-start:0;border-top:1px solid #e6ebf2}.cv-template-modern .cv-body,.cv-template-tech .cv-body{grid-template-columns:1fr}.cv-template-modern .cv-main,.cv-template-tech .cv-main,.cv-template-modern .cv-side,.cv-template-tech .cv-side{order:initial;border-inline-end:0}}
@media(max-width:560px){.cvai-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cvai-template-section,.cvai-form-card{padding:14px}.cvai-hero-pills span{font-size:10px}.cvai-preview-toolbar{align-items:flex-start}}


.aiimages-page{display:flex;flex-direction:column;gap:22px}
.aiimages-hero-band{display:flex;flex-wrap:wrap;gap:10px}
.aiimages-hero-band span{padding:10px 14px;border-radius:999px;background:rgba(37,99,235,.08);border:1px solid rgba(37,99,235,.12);font-weight:700;color:#1d4ed8}
.aiimages-layout{display:grid;grid-template-columns:minmax(320px,420px) 1fr;gap:22px;align-items:start}
.aiimages-builder-card,.aiimages-gallery-card{background:#fff;border:1px solid var(--line);border-radius:28px;padding:22px;box-shadow:var(--shadow)}
.aiimages-builder-head,.aiimages-gallery-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.aiimages-builder-head h2,.aiimages-gallery-head h2{margin:0 0 6px;font-size:1.18rem}
.aiimages-builder-head p,.aiimages-gallery-head p{margin:0;color:var(--muted)}
.aiimages-status{display:inline-flex;align-items:center;justify-content:center;padding:8px 14px;border-radius:999px;font-size:.9rem;font-weight:800;background:#eff6ff;color:#1d4ed8}
.aiimages-status.working{background:#fff7ed;color:#c2410c}
.aiimages-status.success{background:#ecfdf5;color:#047857}
.aiimages-controls-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.aiimages-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.aiimages-chips button{border:1px solid var(--line);background:#f8fafc;border-radius:999px;padding:10px 14px;font-weight:700;color:var(--ink);cursor:pointer}
.aiimages-chips button:hover{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.aiimages-actions-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.aiimages-note{margin:8px 0 0;color:var(--muted);font-size:.92rem}
.aiimages-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.aiimage-card{border:1px solid var(--line);border-radius:22px;overflow:hidden;background:#f8fafc}
.aiimage-thumb-wrap{aspect-ratio:1/1;background:#e2e8f0;display:flex;align-items:center;justify-content:center}
.aiimage-thumb-wrap img{width:100%;height:100%;object-fit:cover;display:block}
.aiimage-card-body{padding:14px;display:flex;flex-direction:column;gap:8px}
.aiimage-card-body strong{font-size:1rem}
.aiimage-card-body small{color:var(--muted)}
.aiimage-actions{display:flex;flex-wrap:wrap;gap:8px}
.aiimage-actions button{border:none;background:#e0ecff;color:#1d4ed8;font-weight:800;border-radius:12px;padding:9px 12px;cursor:pointer}
.aiimage-actions button:hover{background:#dbeafe}
.aiimages-empty-state{grid-column:1/-1}
@media (max-width: 980px){.aiimages-layout{grid-template-columns:1fr}.aiimages-grid{grid-template-columns:1fr 1fr}}
@media (max-width: 640px){.aiimages-controls-grid{grid-template-columns:1fr}.aiimages-grid{grid-template-columns:1fr}}


/* TAOUSSI SCAN V87 */
.scanner-page{display:flex;flex-direction:column;gap:18px}.scanner-page-head{align-items:flex-start}.scanner-kicker{display:inline-flex;padding:7px 11px;border-radius:999px;background:#e8f2ff;color:#1457b8;font-weight:900;font-size:12px;margin-bottom:7px}.scanner-local-badge{padding:9px 12px;border-radius:12px;background:#edfdf5;border:1px solid #c7efd9;color:#087443;font-weight:800;font-size:12px}.scanner-quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.scanner-main-action{border:1px solid #dce5f3;background:#fff;border-radius:19px;padding:16px;display:grid;grid-template-columns:auto 1fr;column-gap:11px;text-align:right;align-items:center;box-shadow:0 8px 22px rgba(30,64,175,.05);color:#18243c}.scanner-main-action>span{grid-row:1/3;font-size:28px;width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:#e9f2ff;color:#155ac3}.scanner-main-action strong{font-size:15px}.scanner-main-action small{color:#8290a7}.scanner-main-action.camera>span{background:#eafaf2;color:#09804b}.scanner-main-action.smart>span{background:#fff5df;color:#bd7100}.scanner-workspace{display:grid;grid-template-columns:190px minmax(0,1fr) 280px;gap:14px;align-items:start}.scanner-pages-panel,.scanner-preview-panel,.scanner-tools-panel{background:#fff;border:1px solid #dfe6f1;border-radius:22px;box-shadow:0 10px 28px rgba(22,45,90,.06)}.scanner-pages-panel{padding:12px;position:sticky;top:84px}.scanner-panel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 2px 12px}.scanner-panel-title>div{display:grid;gap:2px}.scanner-panel-title small{color:#8491a5}.scanner-panel-title button{border:0;background:#fff0f1;color:#c72c3b;border-radius:9px;padding:7px 8px;font-weight:800;font-size:11px}.scanner-pages-list{display:grid;gap:10px;max-height:68vh;overflow:auto}.scanner-pages-empty{border:1px dashed #cad5e5;border-radius:14px;padding:20px 10px;text-align:center;color:#8c98aa;font-size:12px}.scanner-page-thumb{position:relative;border:2px solid transparent;background:#f6f8fc;border-radius:15px;padding:6px;text-align:center;display:grid;gap:5px;color:#536079;overflow:hidden}.scanner-page-thumb.active{border-color:#2d6ee9;background:#eef4ff}.scanner-page-thumb img{width:100%;height:105px;object-fit:cover;border-radius:10px;background:#e7ecf3}.scanner-page-thumb>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.scanner-page-number{position:absolute;top:9px;right:9px;background:#0f2752;color:#fff;border-radius:999px;min-width:24px;height:24px;display:grid;place-items:center;font-size:11px;font-weight:900;z-index:2}.scanner-preview-panel{overflow:hidden}.scanner-preview-toolbar{padding:10px 12px;border-bottom:1px solid #e6ebf3;display:flex;justify-content:space-between;gap:9px;flex-wrap:wrap}.scanner-toolbar-group{display:flex;gap:7px;flex-wrap:wrap}.scanner-toolbar-group button{border:1px solid #dce4ef;background:#f8faff;color:#30405a;border-radius:10px;padding:8px 10px;font-weight:800}.scanner-toolbar-group button:hover:not(:disabled){background:#eaf2ff;color:#135dc3}.scanner-toolbar-group button.danger{color:#c52b3d}.scanner-toolbar-group button:disabled{opacity:.45}.scanner-preview-stage{min-height:570px;background:linear-gradient(45deg,#e9edf3 25%,transparent 25%) 0 0/24px 24px,linear-gradient(-45deg,#e9edf3 25%,transparent 25%) 0 12px/24px 24px,linear-gradient(45deg,transparent 75%,#e9edf3 75%) 12px -12px/24px 24px,linear-gradient(-45deg,transparent 75%,#e9edf3 75%) -12px 0/24px 24px,#f7f9fc;display:grid;place-items:center;padding:22px;overflow:auto}.scanner-preview-stage canvas{max-width:100%;max-height:68vh;box-shadow:0 15px 42px rgba(17,34,68,.22);background:#fff}.scanner-preview-empty{text-align:center;color:#7f8da2}.scanner-preview-empty>div{font-size:65px;color:#a8bad1}.scanner-preview-empty strong{display:block;font-size:17px;color:#506079;margin:6px 0}.scanner-preview-empty p{margin:0}.scanner-page-info{padding:10px 13px;border-top:1px solid #e7ebf2;display:flex;justify-content:space-between;gap:10px;color:#65728a;font-size:12px}.scanner-page-info strong{color:#26334b}.scanner-tools-panel{padding:12px;display:grid;gap:11px;position:sticky;top:84px}.scanner-tool-box{border:1px solid #e2e8f1;border-radius:16px;padding:12px;background:#fbfcfe}.scanner-tool-title{display:grid;gap:2px;margin-bottom:10px}.scanner-tool-title strong{font-size:13px}.scanner-tool-title small{font-size:10px;color:#8793a6}.scanner-filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.scanner-filter-grid button{border:1px solid #dce4ef;background:#fff;border-radius:10px;padding:9px 6px;font-size:11px;font-weight:800;color:#536079}.scanner-filter-grid button.active{background:#1f6fe5;border-color:#1f6fe5;color:#fff}.scanner-tool-box label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px;font-size:11px;font-weight:700;color:#526079;margin:9px 0}.scanner-tool-box label input[type=range]{grid-column:1/-1;width:100%;accent-color:#1e6fe5}.scanner-ocr-btn,.scanner-light-btn{width:100%;border:0;border-radius:11px;padding:10px;font-weight:900}.scanner-ocr-btn{background:#eaf2ff;color:#155fc9}.scanner-light-btn{background:#f1f3f7;color:#536079;margin-top:7px}.scanner-ocr-box textarea{width:100%;resize:vertical;border:1px solid #dce4ef;border-radius:10px;padding:8px;margin-top:8px;min-height:105px}.scanner-export-bar{background:#0e2856;color:#fff;border-radius:21px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:14px;box-shadow:0 12px 30px rgba(11,37,82,.18)}.scanner-export-bar strong{font-size:16px}.scanner-export-bar p{margin:3px 0 0;color:#bcd0ee;font-size:12px}.scanner-export-actions{display:flex;gap:9px;flex-wrap:wrap}.scanner-export-actions button{border:0;border-radius:12px;padding:11px 15px;font-weight:900}.scanner-export-primary{background:#3b82f6;color:#fff}.scanner-export-secondary{background:#fff;color:#18345f}.scanner-export-actions button:disabled{opacity:.45}.scanner-note{margin:0;color:#748198;font-size:12px;text-align:center}.scanner-service .service-icon{background:linear-gradient(135deg,#e8f2ff,#dceaff);color:#1e65cd}
@media(max-width:1180px){.scanner-workspace{grid-template-columns:165px minmax(0,1fr)}.scanner-tools-panel{grid-column:1/-1;position:static;grid-template-columns:repeat(3,1fr)}.scanner-pages-panel{position:static}}
@media(max-width:780px){.scanner-quick-actions{grid-template-columns:1fr}.scanner-workspace{grid-template-columns:1fr}.scanner-pages-panel{order:2}.scanner-preview-panel{order:1}.scanner-tools-panel{order:3;grid-template-columns:1fr}.scanner-pages-list{display:flex;overflow-x:auto;max-height:none}.scanner-page-thumb{min-width:120px}.scanner-page-thumb img{height:90px}.scanner-preview-stage{min-height:380px;padding:12px}.scanner-export-bar{align-items:stretch;flex-direction:column}.scanner-export-actions button{flex:1}.scanner-pages-panel{position:static}}

.aiimages-status.error{background:#fef2f2;color:#b91c1c}
.aiimage-thumb-wrap.aiimage-load-error{position:relative;background:#f8fafc;border:1px dashed #cbd5e1}
.aiimage-thumb-wrap.aiimage-load-error::after{content:'تعذر تحميل الصورة — حاول مرة أخرى';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:18px;color:#64748b;font-weight:800;background:#f8fafc}


/* V90 — login required for every service */
.guest-mode .nav-item[data-page]:not([data-page="home"]) {
  position: relative;
}
.guest-mode .nav-item[data-page]:not([data-page="home"])::after {
  content: "🔒";
  font-size: .78rem;
  margin-inline-start: auto;
  opacity: .85;
}
.guest-mode .service-card [data-page-target]::before {
  content: "🔒 ";
}
.guest-mode .service-card {
  cursor: pointer;
}


/* V91 — TAOUSSI Scan Pro */
.scanner-mode-tabs{display:flex;gap:8px;flex-wrap:wrap;background:#0d244d;padding:8px;border-radius:16px;width:max-content;max-width:100%}
.scanner-mode-tabs button{border:0;background:transparent;color:#c7d6ef;padding:10px 15px;border-radius:11px;font-weight:900;cursor:pointer}
.scanner-mode-tabs button.active{background:#168bc2;color:#fff}
.scanner-tab-panel{display:none}
.scanner-tab-panel.active{display:block}
.scanner-save-name-wrap{display:grid;gap:5px;min-width:260px}
.scanner-save-name-wrap input{margin-top:6px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.08);color:#fff;border-radius:10px;padding:10px 12px;outline:none}
.scanner-save-name-wrap input::placeholder{color:#b8c8e2}
.scanner-filter-grid{grid-template-columns:1fr 1fr}
.scanner-saved-head{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;border:1px solid #dfe6f1;border-radius:20px;padding:16px 18px;margin-bottom:14px}
.scanner-saved-head h2{margin:0 0 4px}
.scanner-saved-head p{margin:0;color:#7b879a}
.scanner-saved-head button{border:1px solid #dce4ef;background:#f8faff;color:#1e5ebc;border-radius:11px;padding:9px 13px;font-weight:900}
.scanner-saved-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.scanner-saved-empty{grid-column:1/-1;background:#fff;border:1px dashed #cdd8e7;border-radius:18px;padding:38px;text-align:center;color:#8794a8}
.scanner-saved-card{display:grid;grid-template-columns:88px 1fr;grid-template-areas:"thumb info" "thumb actions";gap:8px 12px;background:#fff;border:1px solid #dfe6f1;border-radius:18px;padding:12px;box-shadow:0 8px 22px rgba(22,45,90,.05)}
.scanner-saved-thumb{grid-area:thumb;width:88px;height:110px;border-radius:12px;overflow:hidden;background:#eef2f7;display:grid;place-items:center;color:#8fa0b7;font-size:32px}
.scanner-saved-thumb img{width:100%;height:100%;object-fit:cover}
.scanner-saved-info{grid-area:info;display:grid;align-content:start;gap:5px}
.scanner-saved-info strong{font-size:14px}
.scanner-saved-info small{color:#7e8ca2}
.scanner-saved-actions{grid-area:actions;display:flex;gap:7px;align-items:end}
.scanner-saved-actions button{border:0;background:#eaf2ff;color:#155fc9;border-radius:9px;padding:8px 11px;font-weight:900}
.scanner-saved-actions button.danger{background:#fff0f1;color:#c72c3b}
@media(max-width:980px){.scanner-saved-list{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.scanner-saved-list{grid-template-columns:1fr}.scanner-mode-tabs{width:100%}.scanner-mode-tabs button{flex:1}.scanner-save-name-wrap{min-width:0;width:100%}}


/* V92 — full document-control tool palette */
.scanner-pro-tools{padding:16px}
.scanner-pro-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.scanner-pro-grid button{
  min-height:72px;
  display:grid;
  grid-template-columns:38px 1fr;
  grid-template-areas:"icon title" "icon sub";
  align-items:center;
  text-align:start;
  gap:0 8px;
  padding:10px 11px;
  border:1px solid #dce5f0;
  background:#f8fafc;
  border-radius:14px;
}
.scanner-pro-grid button>span{
  grid-area:icon;
  width:38px;height:38px;border-radius:11px;
  display:grid;place-items:center;
  background:#eaf2ff;color:#1963c7;font-weight:900;
}
.scanner-pro-grid button>b{grid-area:title;font-size:13px;color:#17325a}
.scanner-pro-grid button>small{grid-area:sub;font-size:10px;color:#7c8ba1;line-height:1.25}
.scanner-pro-grid button.active{
  border-color:#21b8b0;background:#ecfffc;box-shadow:0 0 0 2px rgba(33,184,176,.12)
}
.scanner-pro-grid button.active>span{background:#19b6ad;color:#fff}
.scanner-apply-all-row{
  margin-top:12px;
  display:flex!important;align-items:center;gap:9px;
  background:#f7fafc;border:1px solid #e1e8f2;border-radius:12px;
  padding:10px 12px;font-weight:800;color:#334d70
}
.scanner-apply-all-row input{width:17px;height:17px;accent-color:#17a9a1}
@media(max-width:640px){
  .scanner-pro-grid{grid-template-columns:1fr}
}


/* V93 — interactive crop mode */
.scanner-preview-stage{position:relative}
#scannerCropModeBtn.active{background:#1f6fe5;border-color:#1f6fe5;color:#fff}
.scanner-manual-crop-box{transition:.18s ease}
.scanner-manual-crop-box.active{border-color:#1f6fe5;box-shadow:0 0 0 3px rgba(31,111,229,.12);background:#f8fbff}
.scanner-crop-overlay{position:absolute;pointer-events:none;z-index:4}
.scanner-crop-overlay::before{content:"";position:absolute;inset:0;background:rgba(10,19,35,.24);clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 0)}
.scanner-crop-box{position:absolute;border:2px solid #00bcd4;box-shadow:0 0 0 9999px rgba(8,19,37,.24) inset;background:rgba(255,255,255,.08);pointer-events:none}
.scanner-crop-help{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);background:rgba(14,40,86,.88);color:#fff;padding:7px 11px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}
.scanner-crop-handle{position:absolute;pointer-events:auto;border:2px solid #fff;background:#00bcd4;border-radius:999px;width:18px;height:18px;padding:0;box-shadow:0 4px 12px rgba(0,0,0,.18);cursor:pointer}
.scanner-crop-handle.tl{top:-9px;left:-9px;cursor:nwse-resize}
.scanner-crop-handle.tr{top:-9px;right:-9px;cursor:nesw-resize}
.scanner-crop-handle.bl{bottom:-9px;left:-9px;cursor:nesw-resize}
.scanner-crop-handle.br{bottom:-9px;right:-9px;cursor:nwse-resize}
.scanner-crop-handle.t{top:-8px;left:50%;transform:translateX(-50%);width:42px;height:14px;border-radius:999px;cursor:ns-resize}
.scanner-crop-handle.b{bottom:-8px;left:50%;transform:translateX(-50%);width:42px;height:14px;border-radius:999px;cursor:ns-resize}
.scanner-crop-handle.l{left:-8px;top:50%;transform:translateY(-50%);width:14px;height:42px;border-radius:999px;cursor:ew-resize}
.scanner-crop-handle.r{right:-8px;top:50%;transform:translateY(-50%);width:14px;height:42px;border-radius:999px;cursor:ew-resize}
@media (max-width:780px){.scanner-crop-help{bottom:8px;font-size:10px;padding:6px 10px}}


/* V94 — fixed crop dragging */
.scanner-crop-overlay,
.scanner-crop-box,
.scanner-crop-handle{
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
}
.scanner-crop-overlay{pointer-events:none}
.scanner-crop-box{
  pointer-events:auto;
  cursor:move;
}
.scanner-crop-handle{
  pointer-events:auto!important;
  z-index:8;
}
body.scanner-crop-dragging,
body.scanner-crop-dragging *{
  cursor:grabbing!important;
  user-select:none!important;
}


/* V98 — expanded original TAOUSSI CV template library */
.cv-mini.azure:before{background:#168aad}.cv-mini.teal:before{background:#0f766e}.cv-mini.forest:before{background:#14532d}.cv-mini.royal:before{background:#3730a3}.cv-mini.rose:before{background:#be4768}.cv-mini.sand:before{background:#9a7b4f}.cv-mini.slate:before{background:#475569}.cv-mini.sky:before{background:#0284c7}.cv-mini.coral:before{background:#e76f51}.cv-mini.mint:before{background:#2a9d8f}.cv-mini.indigo:before{background:#4338ca}.cv-mini.maroon:before{background:#7f1d1d}.cv-mini.executiveblue:before{background:linear-gradient(90deg,#102a43,#486581)}.cv-mini.cleanline:before{background:#fff;border-bottom:3px solid #2563eb}.cv-mini.compact:before{height:12px;background:#334155}.cv-mini.timeline:before{background:#0f766e}.cv-mini.sidebarblue:before{background:linear-gradient(90deg,#1d4ed8 0 32%,#f8fafc 32%)}.cv-mini.sidebardark:before{background:linear-gradient(90deg,#111827 0 36%,#f9fafb 36%)}.cv-mini.topbar:before{height:26px;background:#334155}.cv-mini.softgray:before{background:#e5e7eb;border-bottom:2px solid #64748b}.cv-mini.creativewave:before{background:linear-gradient(120deg,#7c3aed,#ec4899,#f59e0b)}.cv-mini.ats:before{background:#fff;border-bottom:1px solid #111}.cv-mini.arabicpro:before{background:#0f4c5c}.cv-mini.european:before{background:#244b7a}

.cv-template-azure{--cv-accent:#168aad;--cv-accent-soft:#e8f7fb;--cv-head:#0f6782;--cv-side:#f3fbfd}
.cv-template-teal{--cv-accent:#0f766e;--cv-accent-soft:#e8f7f5;--cv-head:#115e59;--cv-side:#f0fdfa}
.cv-template-forest{--cv-accent:#166534;--cv-accent-soft:#edf8f0;--cv-head:#14532d;--cv-side:#f7fcf8}
.cv-template-royal{--cv-accent:#4f46e5;--cv-accent-soft:#eef2ff;--cv-head:#312e81;--cv-side:#f8f8ff}
.cv-template-rose{--cv-accent:#be4768;--cv-accent-soft:#fff0f5;--cv-head:#8f2d4f;--cv-side:#fff8fb}
.cv-template-sand{--cv-accent:#8b6f47;--cv-accent-soft:#f7f1e7;--cv-head:#5f4b32;--cv-side:#fcfaf5}
.cv-template-slate{--cv-accent:#475569;--cv-accent-soft:#f1f5f9;--cv-head:#334155;--cv-side:#f8fafc}
.cv-template-sky{--cv-accent:#0284c7;--cv-accent-soft:#eaf7fe;--cv-head:#075985;--cv-side:#f5fbff}
.cv-template-coral{--cv-accent:#d45d43;--cv-accent-soft:#fff0ec;--cv-head:#9f3f2d;--cv-side:#fff8f5}
.cv-template-mint{--cv-accent:#2a9d8f;--cv-accent-soft:#e8f7f3;--cv-head:#1e766d;--cv-side:#f3fbf9}
.cv-template-indigo{--cv-accent:#4338ca;--cv-accent-soft:#eef2ff;--cv-head:#312e81;--cv-side:#f7f7ff}
.cv-template-maroon{--cv-accent:#7f1d1d;--cv-accent-soft:#fff1f2;--cv-head:#5f1717;--cv-side:#fff8f8}
.cv-template-executiveblue{--cv-accent:#486581;--cv-accent-soft:#edf2f7;--cv-head:linear-gradient(135deg,#102a43,#486581);--cv-side:#f4f7fa}
.cv-template-cleanline{--cv-accent:#2563eb;--cv-accent-soft:#eff6ff;--cv-head:#fff;--cv-side:#fff;border:1px solid #dbe3ef}.cv-template-cleanline .cv-head{color:#0f172a;border-bottom:4px solid #2563eb}.cv-template-cleanline .cv-head h2{color:#475569}
.cv-template-compact{--cv-accent:#334155;--cv-accent-soft:#f1f5f9;--cv-head:#334155;--cv-side:#f8fafc}.cv-template-compact .cv-head{padding:14px 20px}.cv-template-compact .cv-section{margin-bottom:12px}.cv-template-compact .cv-body{font-size:12px}
.cv-template-timeline{--cv-accent:#0f766e;--cv-accent-soft:#ecfdf5;--cv-head:#134e4a;--cv-side:#f0fdfa}.cv-template-timeline .cv-main .cv-section{border-inline-start:3px solid var(--cv-accent);padding-inline-start:16px}
.cv-template-sidebarblue{--cv-accent:#1d4ed8;--cv-accent-soft:#dbeafe;--cv-head:#eff6ff;--cv-side:#1d4ed8}.cv-template-sidebarblue .cv-head{color:#172554}.cv-template-sidebarblue .cv-head h2{color:#1e40af}.cv-template-sidebarblue .cv-side{color:#fff}.cv-template-sidebarblue .cv-side h3{color:#fff}.cv-template-sidebarblue .cv-tags span{background:rgba(255,255,255,.18);color:#fff}
.cv-template-sidebardark{--cv-accent:#111827;--cv-accent-soft:#e5e7eb;--cv-head:#f9fafb;--cv-side:#111827}.cv-template-sidebardark .cv-head{color:#111827}.cv-template-sidebardark .cv-head h2{color:#4b5563}.cv-template-sidebardark .cv-side{color:#f9fafb}.cv-template-sidebardark .cv-side h3{color:#fff}.cv-template-sidebardark .cv-tags span{background:#374151;color:#fff}
.cv-template-topbar{--cv-accent:#334155;--cv-accent-soft:#f1f5f9;--cv-head:#334155;--cv-side:#f8fafc}.cv-template-topbar .cv-head{min-height:145px}.cv-template-topbar .cv-head-photo{border-radius:12px}
.cv-template-softgray{--cv-accent:#64748b;--cv-accent-soft:#f1f5f9;--cv-head:#e5e7eb;--cv-side:#f8fafc}.cv-template-softgray .cv-head{color:#1f2937}.cv-template-softgray .cv-head h2{color:#475569}
.cv-template-creativewave{--cv-accent:#7c3aed;--cv-accent-soft:#f3e8ff;--cv-head:linear-gradient(120deg,#6d28d9,#db2777,#f59e0b);--cv-side:#faf5ff}.cv-template-creativewave .cv-head-photo{border-radius:28px 8px 28px 8px}
.cv-template-ats{--cv-accent:#111827;--cv-accent-soft:#f9fafb;--cv-head:#fff;--cv-side:#fff;border:1px solid #d1d5db}.cv-template-ats .cv-head{color:#111827;border-bottom:1px solid #111827;padding:18px 24px}.cv-template-ats .cv-head h2{color:#374151}.cv-template-ats .cv-head-photo{display:none}.cv-template-ats .cv-body{grid-template-columns:1fr}.cv-template-ats .cv-side{border-inline-start:0;border-top:1px solid #d1d5db;display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.cv-template-arabicpro{--cv-accent:#0f4c5c;--cv-accent-soft:#e7f1f3;--cv-head:#0f4c5c;--cv-side:#f3f8f9}.cv-template-arabicpro .cv-section h3{border-bottom:2px solid var(--cv-accent);padding-bottom:5px}
.cv-template-european{--cv-accent:#244b7a;--cv-accent-soft:#eaf0f7;--cv-head:#244b7a;--cv-side:#f2f5f9}.cv-template-european .cv-head-photo{border-radius:6px}.cv-template-european .cv-section h3{text-transform:uppercase;letter-spacing:.03em}

@media(max-width:900px){.cv-template-ats .cv-side{grid-template-columns:1fr}}


/* V99 — CV Arabic / French / English */
.cvai-language-switcher{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;margin-bottom:14px;border:1px solid #dfe7f2;
  background:#f8fbff;border-radius:16px
}
.cvai-language-switcher>span{font-weight:900;color:#29466f}
.cvai-language-buttons{display:flex;gap:7px;flex-wrap:wrap}
.cvai-language-buttons button{
  border:1px solid #d9e3ef;background:#fff;color:#4d617e;border-radius:10px;
  padding:8px 12px;font-weight:900;cursor:pointer
}
.cvai-language-buttons button.active{background:#1769d2;border-color:#1769d2;color:#fff}
.cvai-form-card[dir="ltr"] .cvai-grid label,
.cvai-form-card[dir="ltr"] .cvai-field{text-align:left}
.cvai-form-card[dir="ltr"] input,
.cvai-form-card[dir="ltr"] textarea,
.cvai-form-card[dir="ltr"] select{text-align:left;direction:ltr}
@media(max-width:640px){
  .cvai-language-switcher{align-items:stretch;flex-direction:column}
  .cvai-language-buttons{display:grid;grid-template-columns:repeat(3,1fr)}
}


/* V100 — expanded CV languages */
.cvai-language-buttons{
  max-width:100%;
  overflow-x:auto;
  scrollbar-width:thin;
  padding-bottom:2px;
}
.cvai-language-buttons button{white-space:nowrap;flex:0 0 auto}
@media(max-width:640px){
  .cvai-language-buttons{
    display:flex;
    grid-template-columns:none;
    flex-wrap:nowrap;
    overflow-x:auto;
  }
}

/* V103 - Password recovery management */
.action-password-reset{background:#eef2ff!important;color:#263b8f!important;border:1px solid #cad5ff!important}
.action-password-reset:hover{background:#e2e8ff!important}
.admin-password-note{margin:8px 0 14px;padding:10px 12px;border-radius:12px;background:#f7f9ff;border:1px solid #dfe6ff;color:#465270;font-size:13px;line-height:1.7}
#passwordResetModal .modal-panel h2{margin:0 0 8px}
#passwordResetModal .hint{display:block;margin:0 0 16px;color:#6b7280;line-height:1.6}

/* V126 — TAOUSSI BUSINESS as the flagship service */
.nav-item-library-main{position:relative;margin:3px 0 8px;padding:13px 12px!important;border:1.5px solid #e6bd4f!important;background:linear-gradient(135deg,rgba(255,216,92,.17),rgba(159,106,0,.16))!important;box-shadow:0 0 0 1px rgba(255,235,155,.06) inset,0 7px 18px rgba(0,0,0,.18);overflow:hidden}
.nav-item-library-main:before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.16) 45%,transparent 68%);transform:translateX(115%);animation:libraryGoldShine 4.8s ease-in-out infinite;pointer-events:none}
.nav-item-library-main:hover,.nav-item-library-main.active{background:linear-gradient(135deg,#b78516,#f3cc5d 55%,#9c6c08)!important;color:#10213d!important;border-color:#ffe28a!important;box-shadow:0 10px 24px rgba(181,132,22,.35),0 0 0 1px rgba(255,255,255,.24) inset}
.nav-library-icon{width:34px;height:34px;border-radius:10px;display:grid!important;place-items:center;background:linear-gradient(145deg,#ffe9a7,#d39a1c);color:#4a3300;font-size:18px!important;box-shadow:0 4px 10px rgba(0,0,0,.22);flex:0 0 auto}
.nav-library-copy{display:flex!important;flex-direction:column;gap:1px;min-width:0;line-height:1.15}
.nav-library-copy strong{font-size:14px;white-space:nowrap}
.nav-library-copy small{font-size:9px;color:#f7d66f;font-weight:800;opacity:.95}
.nav-item-library-main:hover .nav-library-copy small,.nav-item-library-main.active .nav-library-copy small{color:#563c00}
.nav-library-crown{margin-inline-start:auto;color:#ffd75a;font-size:15px;filter:drop-shadow(0 1px 2px #0007)}
.nav-item-library-main:hover .nav-library-crown,.nav-item-library-main.active .nav-library-crown{color:#5b3f00}
@keyframes libraryGoldShine{0%,68%{transform:translateX(115%)}82%,100%{transform:translateX(-130%)}}
.service-card.library-service-featured{position:relative;background:radial-gradient(circle at 84% 10%,rgba(255,234,157,.55),transparent 34%),linear-gradient(145deg,#fffdf5,#fff5cf 58%,#f9e8a7);border:2px solid #d8aa35;box-shadow:0 11px 28px rgba(151,105,10,.16),0 0 0 3px rgba(255,218,111,.18) inset;overflow:hidden;min-height:188px}
.service-card.library-service-featured:hover{transform:translateY(-5px);border-color:#b88616;box-shadow:0 16px 34px rgba(151,105,10,.24),0 0 0 3px rgba(255,226,134,.24) inset}
.library-featured-badge{position:absolute;top:10px;right:10px;background:linear-gradient(135deg,#9a6907,#e5b83f);color:#fff8dd;border:1px solid #f5d774;border-radius:999px;padding:4px 9px;font-size:9px;font-weight:900;box-shadow:0 4px 10px rgba(123,84,4,.2)}
.library-featured-icon{width:58px;height:58px;margin:8px auto 5px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#ffe7a0,#d39a1f);box-shadow:0 9px 18px rgba(153,108,13,.22);font-size:30px!important}
.service-card.library-service-featured h4{color:#5f4308;font-size:18px}
.service-card.library-service-featured p{color:#72591b;font-weight:700}
.service-card.library-service-featured .mini-link{color:#8b6207;background:#fff7d8;border:1px solid #e8ca70;border-radius:9px;padding:7px 10px}
@media(max-width:900px){.nav-item-library-main{padding:10px 8px!important;justify-content:center}.nav-item-library-main .nav-library-copy,.nav-item-library-main .nav-library-crown{display:none!important}.nav-library-icon{width:40px;height:40px;font-size:20px!important}.nav-item-library-main{border-width:2px!important}}


/* V134 — library manager opens in a large full-window workspace */
.library-fullscreen-controls{display:none}
body.library-focus-mode{overflow:hidden}
body.library-focus-mode .sidebar,
body.library-focus-mode .topbar,
body.library-focus-mode .mobile-bottom-nav,
body.library-focus-mode footer{display:none!important}
body.library-focus-mode .main{margin-right:0!important;width:100%!important;min-height:100vh!important}
body.library-focus-mode #library{display:block!important;padding:0!important;margin:0!important;height:100vh!important;min-height:100vh!important;background:#fff}
body.library-focus-mode #library .library-manager-page{margin:0!important;padding:0!important;max-width:none!important;width:100%!important;height:100vh!important}
body.library-focus-mode #library .library-manager-head,
body.library-focus-mode #library .library-manager-benefits,
body.library-focus-mode #library .library-manager-note{display:none!important}
body.library-focus-mode #library .library-manager-frame-wrap{height:100vh!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
body.library-focus-mode #library .library-manager-frame-wrap iframe{width:100%!important;height:100vh!important;min-height:100vh!important;border:0!important}
body.library-focus-mode .library-fullscreen-controls{display:flex;position:fixed;left:14px;top:12px;z-index:9999;gap:8px;direction:rtl}
body.library-focus-mode .library-fullscreen-controls button{border:1px solid #d7e1ef;background:rgba(255,255,255,.94);color:#10213d;border-radius:10px;padding:8px 12px;font-weight:800;box-shadow:0 6px 22px #10213d24;cursor:pointer;backdrop-filter:blur(8px)}
body.library-focus-mode .library-fullscreen-controls button:hover{background:#f5f8fd}
@media(max-width:700px){body.library-focus-mode .library-fullscreen-controls{left:8px;top:8px;gap:5px}body.library-focus-mode .library-fullscreen-controls button{padding:7px 9px;font-size:11px}}

/* V141 — Windows desktop download / direct browser choice */
.windows-access-choice{margin-top:12px;padding:11px 12px;border:1px solid #ffffff45;border-radius:15px;background:#041a3f7a;backdrop-filter:blur(8px);display:grid;gap:8px;max-width:720px}
.windows-access-copy{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.windows-access-copy strong{font-size:13px}.windows-access-copy small,.windows-access-note{color:#d8eaff;font-size:11px;line-height:1.6}
.windows-access-actions{display:flex;gap:8px;flex-wrap:wrap}.windows-browser-btn,.windows-download-btn{border:0;border-radius:11px;padding:9px 13px;font-weight:900;font-size:12px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.windows-browser-btn{background:#fff;color:#1266d4}.windows-download-btn{background:linear-gradient(135deg,#10b981,#0e8f6c);color:#fff;box-shadow:0 7px 18px #0628}
.windows-download-btn:hover{transform:translateY(-1px)}
@media(max-width:620px){.windows-access-actions{display:grid;grid-template-columns:1fr}.windows-browser-btn,.windows-download-btn{width:100%}}

/* V142 — invoice-page legacy data safety fix; no visual changes */

/* V146 — POS sale/credit fix; compact A5 invoice print layout lives in library-manager/nabil/styles.css */

/* V148 LAUNCH: unstable campaign-hidden features */
.release-hidden-feature{display:none!important}


/* V151 ANDROID FLEX — touch-first Android/PWA polish */
@media(max-width:900px){
  html{overscroll-behavior-y:none;background:#f5f8fd}
  body{min-width:320px;padding-bottom:calc(72px + env(safe-area-inset-bottom));touch-action:pan-y}
  .topbar{padding-top:max(8px,env(safe-area-inset-top));}
  .mobile-bottom-nav{padding-bottom:max(6px,env(safe-area-inset-bottom));}
  .mobile-nav-btn{min-height:50px;touch-action:manipulation}
  .mobile-nav-library{background:linear-gradient(145deg,#fff8dc,#f5df99)!important;color:#6a4c00!important;border:1px solid #e3be4d!important}
  .nav-item,.btn,.icon-btn,.mobile-menu-btn,.mobile-nav-btn,.service-card button{min-height:44px}
  .library-manager-frame-wrap{height:calc(100dvh - 150px);min-height:620px}
  .library-manager-frame-wrap iframe{height:100%;min-height:620px}
  body.library-focus-mode #library,
  body.library-focus-mode #library .library-manager-page,
  body.library-focus-mode #library .library-manager-frame-wrap,
  body.library-focus-mode #library .library-manager-frame-wrap iframe{height:100dvh!important;min-height:100dvh!important}
  body.library-focus-mode .library-fullscreen-controls{top:max(8px,env(safe-area-inset-top));}
  .install-app-btn{min-height:48px;font-size:14px}
}
@media(max-width:480px){
  .mobile-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))}
  .mobile-nav-btn small{font-size:9px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .library-manager-frame-wrap{height:calc(100dvh - 124px);min-height:560px}
  .library-manager-frame-wrap iframe{min-height:560px}
}


/* V152 — iPhone/iPad polish + admin promotional video rotation */
.admin-promo-videos-panel{margin-top:22px;background:#fff;border:1px solid #e4ebf4;border-radius:20px;padding:16px;box-shadow:0 8px 24px #1231520b}
.promo-video-form{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(190px,.8fr) 120px;gap:11px;align-items:end;padding:13px;border:1px solid #e2e9f2;border-radius:15px;background:#f8fbff;margin-top:12px}
.promo-video-form label{display:grid;gap:6px;font-size:11px;font-weight:800;color:#51647b}.promo-video-form input,.promo-video-form select{width:100%;min-height:43px;border:1px solid #d8e2ee;border-radius:10px;padding:9px 10px;background:#fff;color:#18314f}.promo-video-file{grid-column:1/3}.promo-video-file small{font-weight:500;color:#7d8da0;line-height:1.5}.promo-video-status{grid-column:1/-1;margin:0;color:#6c7d92;font-size:11px;line-height:1.7}.promo-video-summary{display:flex;gap:8px;flex-wrap:wrap;margin:13px 0}.promo-video-summary span{background:#f2f7fd;border:1px solid #deE8f3;border-radius:999px;padding:7px 10px;font-size:11px}.admin-promo-videos-list{display:grid;gap:11px}.admin-promo-video-item{display:grid;grid-template-columns:180px minmax(0,1fr);gap:13px;border:1px solid #e1e8f1;border-radius:15px;padding:11px;background:#fbfcfe}.admin-promo-video-item video{width:180px;aspect-ratio:16/9;object-fit:cover;border-radius:11px;background:#07172a}.admin-promo-video-main{min-width:0;display:grid;gap:8px}.admin-promo-video-head{display:flex;align-items:flex-start;justify-content:space-between;gap:9px}.admin-promo-video-head strong{font-size:14px}.promo-video-state{border-radius:999px;padding:5px 8px;font-size:10px;font-weight:900;white-space:nowrap}.promo-video-state.on{background:#ddf8e7;color:#147945}.promo-video-state.off{background:#eef1f5;color:#687789}.promo-video-edit-row{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:8px}.promo-video-edit-row label{font-size:10px;color:#6e7e91;display:grid;gap:4px}.promo-video-edit-row select,.promo-video-edit-row input{min-height:38px;border:1px solid #d9e3ee;border-radius:9px;padding:7px 8px;background:#fff}.promo-video-actions{display:flex;gap:7px;flex-wrap:wrap}.promo-video-actions button{border:0;border-radius:9px;padding:8px 10px;font-weight:900;font-size:10px;cursor:pointer;min-height:38px}.promo-video-save{background:#e7f1ff;color:#1767d2}.promo-video-toggle{background:#e5f7ec;color:#147945}.promo-video-toggle.is-off{background:#fff1c7;color:#8b6500}.promo-video-delete{background:#ffe5e9;color:#b9233e}.promo-video-meta{font-size:10px;color:#8795a7;overflow-wrap:anywhere}
html[data-theme="dark"] .admin-promo-videos-panel{background:#0c1a29;border-color:#20364d;color:#e8f1fa}html[data-theme="dark"] .promo-video-form,html[data-theme="dark"] .admin-promo-video-item{background:#102235;border-color:#29435c}html[data-theme="dark"] .promo-video-form input,html[data-theme="dark"] .promo-video-form select,html[data-theme="dark"] .promo-video-edit-row select,html[data-theme="dark"] .promo-video-edit-row input{background:#0b1928;border-color:#29435c;color:#edf4fb}
@media(max-width:760px){.promo-video-form{grid-template-columns:1fr}.promo-video-file{grid-column:auto}.admin-promo-video-item{grid-template-columns:1fr}.admin-promo-video-item video{width:100%;max-height:220px}.promo-video-edit-row{grid-template-columns:1fr 105px}}
@supports (-webkit-touch-callout:none){
  body{-webkit-text-size-adjust:100%}
  input,textarea,select{font-size:16px!important}
  .main,.sidebar,.modal-panel,.library-manager-frame-wrap{-webkit-overflow-scrolling:touch}
  .mobile-bottom-nav{padding-left:max(6px,env(safe-area-inset-left));padding-right:max(6px,env(safe-area-inset-right));padding-bottom:max(8px,env(safe-area-inset-bottom))}
  .topbar{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right));padding-top:max(8px,env(safe-area-inset-top))}
  body.library-focus-mode .library-fullscreen-controls{top:max(10px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right))}
}

/* V153 — password visibility + forced recovery UX */
.password-field{position:relative;display:flex;align-items:center;width:100%}
.password-field input{width:100%;padding-left:48px!important}
.password-toggle{position:absolute;left:6px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:9px;background:#eef3fa;color:#234;display:grid;place-items:center;cursor:pointer;font-size:18px;line-height:1}
.password-toggle:hover{background:#e1eaf5}
.password-toggle:focus-visible{outline:3px solid #1677ff55;outline-offset:1px}
#passwordResetModal.recovery-required .modal-close{display:none}
#passwordResetModal.recovery-required .modal-backdrop{cursor:not-allowed}
#passwordResetModal.recovery-required .modal-panel{border:2px solid #1677ff}
@media(max-width:600px){.password-toggle{width:42px;height:42px;left:4px}.password-field input{min-height:48px;padding-left:52px!important}}
