/* TekPrax V5.6.7 — navbar definitivo, régua em cm, PDF Studio e logo de autenticação. */

/* O dock agora vive dentro de #app, no mesmo stacking context do navbar. */
@media (max-width:840px){
  #app{position:relative!important;z-index:1!important;overflow-x:hidden!important}
  #app>.navbar{position:sticky!important;top:0!important;z-index:12000!important;overflow:visible!important;isolation:auto!important}
  #app>.navbar .nav-mobile-elements,
  #app>.navbar .hamburger-menu{position:relative!important;z-index:12020!important}
  #app>.navbar #dropdown-menu,
  #app>.navbar .dropdown-content,
  #app>.navbar .tp-profile-menu{z-index:12050!important}
  #app>#tp-mobile-editor-dock{z-index:9000!important}
  #app>#tp-mobile-editor-panel{z-index:8990!important}
  #app>.tp-admin-mobile-titlebar{z-index:8000!important}
}

/* Régua: centímetros legíveis + margens superior/inferior realmente arrastáveis. */
#text-editor-body .tp-doc-ruler-corner{display:grid!important;place-items:center!important;background:#eaf5ff!important;border-color:#7dd3fc!important}
#text-editor-body .tp-ruler-unit{font-size:6.5px!important;font-weight:950!important;color:#0369a1!important;line-height:1!important;pointer-events:none!important}
#text-editor-body .tp-doc-ruler-h{background-image:repeating-linear-gradient(90deg,transparent 0,transparent calc(var(--tp-ruler-cm-step) - 1px),#cbd5e1 calc(var(--tp-ruler-cm-step) - 1px),#cbd5e1 var(--tp-ruler-cm-step))!important}
#text-editor-body .tp-doc-ruler-v{background-image:repeating-linear-gradient(180deg,transparent 0,transparent calc(var(--tp-ruler-cm-step) - 1px),#cbd5e1 calc(var(--tp-ruler-cm-step) - 1px),#cbd5e1 var(--tp-ruler-cm-step))!important}
#text-editor-body .tp-doc-ruler-h .tp-ruler-number{font-size:7px!important;font-weight:800!important;color:#475569!important;top:5px!important}
#text-editor-body .tp-doc-ruler-v .tp-ruler-number{font-size:7px!important;font-weight:850!important;color:#475569!important;left:0!important;width:100%!important;text-align:center!important;transform:translateY(-50%)!important;line-height:1!important}
#text-editor-body .tp-doc-ruler-v .tp-ruler-handle{left:-4px!important;width:calc(100% + 8px)!important;height:9px!important;border-radius:999px!important;background:#0ea5e9!important;box-shadow:0 0 0 2px #fff,0 2px 7px rgba(14,165,233,.35)!important;cursor:ns-resize!important}
#text-editor-body .tp-ruler-margin-handle::before{content:"";position:absolute;left:50%;top:50%;width:5px;height:5px;border-radius:50%;background:#fff;transform:translate(-50%,-50%)}
#text-editor-body .tp-ruler-handle-label{position:absolute;left:calc(100% + 5px);top:50%;transform:translateY(-50%);background:#075985;color:#fff;border-radius:5px;padding:2px 4px;font-size:7px;font-weight:900;white-space:nowrap;line-height:1.2;pointer-events:none;box-shadow:0 2px 6px rgba(15,23,42,.18);opacity:0;visibility:hidden;transition:opacity .12s}
#text-editor-body .tp-ruler-handle.is-adjusting .tp-ruler-handle-label,#text-editor-body .tp-ruler-handle:active .tp-ruler-handle-label{background:#0c4a6e;opacity:1;visibility:visible}

@media(max-width:520px){
  #text-editor-body:has(.tp-doc-ruler-on){padding:36px 12px 18px 38px!important;overflow:auto!important}
  #text-editor-body .tp-doc-ruler-v{left:-31px!important;width:25px!important;top:-3px!important;bottom:-3px!important;}
  #text-editor-body .tp-doc-ruler-h{top:-27px!important;height:20px!important;left:-3px!important;right:-3px!important}
  #text-editor-body .tp-doc-ruler-corner{left:-31px!important;top:-27px!important;width:25px!important;height:20px!important}
  #text-editor-body .tp-doc-ruler-v .tp-ruler-number{font-size:6.5px!important}
  #text-editor-body .tp-ruler-handle-label{font-size:6.5px!important;left:calc(100% + 4px)}
}

/* PDF Studio: mais contraste e identidade visual sem comprometer leitura. */
.tools-main-pdf{background:radial-gradient(circle at 10% 4%,rgba(14,165,233,.10),transparent 28%),radial-gradient(circle at 92% 18%,rgba(16,185,129,.11),transparent 25%),#f8fafc!important}
.tools-pdf-studio{background:linear-gradient(145deg,#f8fcff 0%,#ffffff 48%,#f5fffb 100%)!important;border:1px solid #bae6fd!important;box-shadow:0 18px 46px rgba(2,132,199,.10)!important}
.tools-pdf-studio-head{padding:16px 18px!important;border-radius:18px!important;background:linear-gradient(135deg,#0a2540 0%,#075985 52%,#047857 100%)!important;box-shadow:0 10px 26px rgba(10,37,64,.18)!important}
.tools-pdf-studio-head h1{color:#fff!important}.tools-pdf-studio-head p{color:#d9f7ff!important}
.tools-pdf-studio-icon{background:linear-gradient(145deg,#fff,#e0f2fe)!important;border-color:rgba(255,255,255,.7)!important;box-shadow:0 5px 13px rgba(15,23,42,.20)!important}
.tools-pdf-studio .tools-pdf-picker{background:linear-gradient(135deg,#e0f2fe,#ecfeff 52%,#ecfdf5)!important;border-color:#7dd3fc!important;box-shadow:0 5px 14px rgba(14,165,233,.08)!important}
.tools-pdf-studio .tools-card-grid{gap:12px!important}
.tools-pdf-studio .tools-action-card{position:relative!important;overflow:hidden!important;border:1px solid #dbe4ee!important;border-top:4px solid var(--tp-pdf-accent,#0ea5e9)!important;box-shadow:0 7px 18px rgba(15,23,42,.06)!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important}
.tools-pdf-studio .tools-action-card:hover{transform:translateY(-3px)!important;box-shadow:0 13px 26px rgba(15,23,42,.12)!important;border-color:var(--tp-pdf-accent,#0ea5e9)!important}
.tools-pdf-studio .tools-action-card:nth-child(1){--tp-pdf-accent:#0ea5e9;background:linear-gradient(145deg,#eff9ff,#fff)!important}
.tools-pdf-studio .tools-action-card:nth-child(2){--tp-pdf-accent:#7c3aed;background:linear-gradient(145deg,#f5f3ff,#fff)!important}
.tools-pdf-studio .tools-action-card:nth-child(3){--tp-pdf-accent:#f59e0b;background:linear-gradient(145deg,#fffbeb,#fff)!important}
.tools-pdf-studio .tools-action-card:nth-child(4){--tp-pdf-accent:#10b981;background:linear-gradient(145deg,#ecfdf5,#fff)!important}
.tools-pdf-studio .tools-action-card:nth-child(5){--tp-pdf-accent:#2563eb;background:linear-gradient(145deg,#eff6ff,#fff)!important}
.tools-pdf-studio .tools-action-card:nth-child(6){--tp-pdf-accent:#db2777;background:linear-gradient(145deg,#fdf2f8,#fff)!important}
.tools-pdf-studio .tools-action-card:nth-child(7){--tp-pdf-accent:#ea580c;background:linear-gradient(145deg,#fff7ed,#fff)!important}
.tools-pdf-studio .tools-action-card:nth-child(8){--tp-pdf-accent:#0891b2;background:linear-gradient(145deg,#ecfeff,#fff)!important}

@media(max-width:640px){
  .tools-pdf-studio-head{margin:-2px -2px 11px!important;border-radius:14px!important;padding:12px!important}
  .tools-pdf-studio .tools-action-card{border-radius:13px!important;border-top-width:3px!important}
}

/* Login desktop: mantém exatamente a proporção visual do átomo usado no mobile. */
.auth-layout .atom-nucleus{width:27.777777%!important;height:27.777777%!important}
.auth-layout .atom-orbit::before{width:22.222222%!important;height:22.222222%!important;top:-11.111111%!important}


#text-editor-body .tp-doc-ruler-h .tp-ruler-handle-label{left:50%;top:calc(100% + 5px);transform:translateX(-50%);font-size:7px}
#text-editor-body .tp-doc-ruler-h .margin-left .tp-ruler-handle-label{transform:translateX(-10%)}
#text-editor-body .tp-doc-ruler-h .margin-right .tp-ruler-handle-label{transform:translateX(-90%)}
