/* =============================================================
   custom.css — Estilos globais customizados do InovaLgpd
   Adicione aqui customizações que se aplicam a todo o sistema.
   ============================================================= */

/* --- Stat Cards (painel-client) -------------------------------- */
.stat-cards-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px;}
.stat-card{flex:1;min-width:130px;background:var(--white);border:1px solid var(--gray-200);border-radius:12px;padding:14px 12px;text-align:center;box-shadow:0 1px 3px rgba(0,0,0,.04);transition:all .3s;}
.stat-card:hover{box-shadow:0 4px 14px rgba(0,0,0,.08);transform:translateY(-2px);}
.stat-card.sc-green{border-color:rgba(16,185,129,.3);}
.stat-card.sc-blue{border-color:rgba(14,165,233,.3);}
.stat-card.sc-yellow{border-color:rgba(245,158,11,.3);}
.stat-card.sc-red{border-color:rgba(239,68,68,.3);}
.stat-card-value{font-family:var(--font-mono);font-size:26px;font-weight:700;line-height:1;}
.stat-card.sc-green .stat-card-value{color:var(--green);}
.stat-card.sc-blue .stat-card-value{color:var(--blue-accent);}
.stat-card.sc-yellow .stat-card-value{color:var(--yellow);}
.stat-card.sc-red .stat-card-value{color:var(--red);}
.stat-card.sc-gray .stat-card-value{color:var(--gray-400);}
.stat-card-label{font-size:11px;font-weight:600;color:var(--gray-700);margin-top:4px;letter-spacing:.04em;}
.stat-card-sub{font-size:10px;color:var(--gray-500);margin-top:2px;}
.stat-card-action{display:inline-block;margin-top:8px;font-size:11px;font-weight:500;color:var(--blue-primary);text-decoration:none;background:none;border:none;cursor:pointer;padding:0;}
.stat-card-action:hover{color:var(--blue-accent);text-decoration:underline;}
:root {
    --bg-dark:#0d1b2a;--bg-dark2:#1b2a3d;--bg-dark3:#152238;
    --blue-primary:#1a6eb5;--blue-accent:#0ea5e9;--blue-light:#e0f2fe;
    --green:#10b981;--green-dark:#059669;--yellow:#f59e0b;--red:#ef4444;--red-dark:#b91c1c;--orange:#f97316;
    --gray-50:#f8fafc;--gray-100:#f1f5f9;--gray-200:#e2e8f0;--gray-300:#cbd5e1;--gray-400:#94a3b8;
    --gray-500:#64748b;--gray-600:#475569;--gray-700:#334155;--gray-800:#1e293b;--gray-900:#0f172a;
    --white:#ffffff;
    --font-display:'Playfair Display',Georgia,serif;
    --font-body:'DM Sans',system-ui,sans-serif;
    --font-mono:'JetBrains Mono',monospace;
}
.presentation *{margin:0;padding:0;box-sizing:border-box;}
.presentation{width:100%;height:100%;overflow:hidden;font-family:var(--font-body);background:var(--bg-dark);}
.presentation{width:100%;height:100%;position:relative;}
.slide{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;pointer-events:none;transition:opacity .5s,transform .5s;transform:translateX(30px);overflow-y:auto;display:flex;flex-direction:column;}
.slide.active{opacity:1;pointer-events:auto;transform:translateX(0);z-index:2;}

/* Nav */
.nav-bar{position:fixed;bottom:0;left:0;right:0;z-index:100;background:rgba(13,27,42,.95);backdrop-filter:blur(12px);border-top:1px solid rgba(255,255,255,.08);padding:10px 20px;display:flex;align-items:center;justify-content:space-between;}
.nav-dots{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;flex:1;}
.nav-dot{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.2);cursor:pointer;transition:all .3s;border:none;}
.nav-dot.active{background:var(--blue-accent);transform:scale(1.3);}
.nav-dot:hover{background:rgba(255,255,255,.5);}
.nav-btn{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);color:#fff;padding:8px 18px;border-radius:8px;cursor:pointer;font-family:var(--font-body);font-size:13px;font-weight:500;transition:all .3s;}
.nav-btn:hover{background:rgba(255,255,255,.2);}
.nav-btn:disabled{opacity:.3;cursor:default;}
.slide-counter{color:var(--gray-400);font-family:var(--font-mono);font-size:12px;min-width:60px;text-align:center;}

/* Footer */
.slide-footer{margin-top:auto;padding:12px 40px;text-align:center;font-size:11px;flex-shrink:0;}
.slide-footer.dark{color:var(--gray-400);border-top:1px solid rgba(255,255,255,.06);}
.slide-footer.light{color:var(--gray-500);border-top:1px solid var(--gray-200);}

/* Backgrounds */
.slide-dark{background:linear-gradient(145deg,var(--bg-dark) 0%,var(--bg-dark3) 100%);color:#fff;}
.slide-light{background:linear-gradient(160deg,#f8fafc 0%,#eef4fb 50%,#e8f0fe 100%);color:var(--gray-800);}

/* Content */
.slide-content{flex:1;padding:36px 50px 20px;overflow-y:auto;}
.slide-content.centered{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}

/* Typography */
h1.slide-title{font-family:var(--font-display);font-size:36px;font-weight:700;margin-bottom:8px;line-height:1.2;}
h2.section-title{font-family:var(--font-display);font-size:26px;font-weight:700;color:var(--gray-800);margin-bottom:4px;}
h3.section-sub{font-family:var(--font-body);font-size:13px;font-weight:400;color:var(--gray-500);margin-bottom:24px;}

/* Cards */
.card-grid{display:grid;gap:14px;}
.card-grid-2{grid-template-columns:repeat(2,1fr);}
.card-grid-3{grid-template-columns:repeat(3,1fr);}
.card-grid-4{grid-template-columns:repeat(4,1fr);}

/* Light card */
.lc{background:var(--white);border:1px solid var(--gray-200);border-radius:14px;padding:20px;box-shadow:0 1px 4px rgba(0,0,0,.04);transition:all .3s;}
.lc:hover{box-shadow:0 8px 24px rgba(0,0,0,.07);transform:translateY(-2px);}

/* Dark card (for slides 1 & 12) */
.dc{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:20px;transition:all .3s;}
.dc:hover{box-shadow:0 8px 24px rgba(0,0,0,.3);transform:translateY(-2px);}

/* KPI */
.kpi-value{font-family:var(--font-mono);font-size:34px;font-weight:700;line-height:1;}
.kpi-label{font-size:12px;color:var(--gray-500);margin-top:5px;}

/* Badges */
.badge{display:inline-block;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;font-family:var(--font-mono);}
.badge-green{background:rgba(16,185,129,.12);color:var(--green);}
.badge-blue{background:rgba(14,165,233,.12);color:var(--blue-accent);}
.badge-yellow{background:rgba(245,158,11,.12);color:var(--yellow);}
.badge-red{background:rgba(239,68,68,.12);color:var(--red);}
.badge-orange{background:rgba(249,115,22,.12);color:var(--orange);}

/* Progress */
.pbar{width:100%;height:8px;background:var(--gray-200);border-radius:4px;overflow:hidden;margin:8px 0;}
.pfill{height:100%;border-radius:4px;transition:width 1s ease;}

/* Accordion */
.accordion{margin-bottom:8px;border:1px solid var(--gray-200);border-radius:12px;overflow:hidden;background:var(--white);}
.acc-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;cursor:pointer;font-weight:600;font-size:14px;color:var(--gray-800);transition:background .3s;}
.acc-header:hover{background:var(--gray-50);}
.acc-body{max-height:0;overflow:hidden;transition:max-height .4s ease;}
.acc-body.open{max-height:3000px;}
.acc-body-inner{padding:0 18px 16px;font-size:13px;line-height:1.7;color:var(--gray-600);}
.acc-chevron{transition:transform .3s;font-size:18px;color:var(--gray-400);}
.acc-chevron.open{transform:rotate(180deg);}

/* Company selector */
.cs{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap;}
.cs-btn{padding:8px 16px;border-radius:8px;font-size:12px;font-weight:600;font-family:var(--font-mono);cursor:pointer;border:1px solid var(--gray-300);background:var(--white);color:var(--gray-600);transition:all .3s;}
.cs-btn.active{background:var(--blue-primary);color:#fff;border-color:var(--blue-primary);}
.cs-btn:hover:not(.active){background:var(--gray-100);color:var(--gray-800);}
.company-data{display:none;}
.company-data.active{display:block;}

/* Risk cards enhanced */
.risk-card{border-radius:14px;padding:18px 20px;margin-bottom:12px;border:1px solid;transition:all .3s;}
.risk-card:hover{transform:translateY(-1px);}
.rc-critical{background:rgba(239,68,68,.04);border-color:rgba(239,68,68,.2);border-left:5px solid var(--red);}
.rc-indef{background:rgba(249,115,22,.04);border-color:rgba(249,115,22,.2);border-left:5px solid var(--orange);}
.rc-very-high{background:rgba(185,28,28,.04);border-color:rgba(185,28,28,.2);border-left:5px solid var(--red-dark);}
.rc-high{background:rgba(245,158,11,.04);border-color:rgba(245,158,11,.2);border-left:5px solid var(--yellow);}
.rc-low{background:rgba(16,185,129,.04);border-color:rgba(16,185,129,.2);border-left:5px solid var(--green);}

/* Policy card enhanced */
.pol-card{background:var(--white);border:1px solid var(--gray-200);border-radius:14px;overflow:hidden;transition:all .3s;box-shadow:0 1px 3px rgba(0,0,0,.04);}
.pol-card:hover{box-shadow:0 6px 20px rgba(0,0,0,.07);transform:translateY(-2px);}
.pol-header{padding:16px 20px;display:flex;align-items:center;gap:14px;cursor:pointer;transition:background .2s;}
.pol-header:hover{background:var(--gray-50);}
.pol-num{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,var(--blue-primary),var(--blue-accent));color:#fff;font-family:var(--font-mono);font-size:13px;font-weight:700;flex-shrink:0;}
.pol-body{max-height:0;overflow:hidden;transition:max-height .4s ease;}
.pol-body.open{max-height:500px;}
.pol-body-inner{padding:0 20px 18px 70px;font-size:13px;line-height:1.7;color:var(--gray-600);}
.pol-lgpd{display:inline-flex;align-items:center;gap:6px;margin-top:10px;padding:6px 12px;background:var(--blue-light);border-radius:8px;font-size:11px;font-weight:600;color:var(--blue-primary);}

/* Scrollbar */
::-webkit-scrollbar{width:6px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:rgba(0,0,0,.12);border-radius:3px;}

@media(max-width:900px){
    .card-grid-2,.card-grid-3,.card-grid-4{grid-template-columns:1fr;}
    .slide-content{padding:20px 18px 16px;}
    h1.slide-title{font-size:24px;}
    h2.section-title{font-size:20px;}
    .kpi-value{font-size:26px;}
    .gantt-label{width:120px!important;font-size:9px!important;}
}

@keyframes fadeInUp{from{opacity:0;transform:translateY(20px);}to{opacity:1;transform:translateY(0);}}
.fiu{animation:fadeInUp .6s ease forwards;}
.d1{animation-delay:.1s;opacity:0;}
.d2{animation-delay:.2s;opacity:0;}
.d3{animation-delay:.3s;opacity:0;}
.d4{animation-delay:.4s;opacity:0;}

/* HBox info cards */
.hbox{border-radius:10px;padding:14px 16px;border:1px solid var(--gray-200);background:var(--white);}
.hbox-info{background:#eff6ff;border-color:#bfdbfe;border-left:4px solid var(--blue-primary);}
.hbox-warning{background:#fffbeb;border-color:#fde68a;border-left:4px solid var(--yellow);}
.hbox-danger{background:#fef2f2;border-color:#fecaca;border-left:4px solid var(--red);}
.hbox-success{background:#f0fdf4;border-color:#bbf7d0;border-left:4px solid var(--green);}
.hbox-title{font-size:12px;font-weight:700;color:var(--gray-800);text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px;}
.hbox-text{font-size:13px;color:var(--gray-700);line-height:1.6;}
.hbox-text strong{color:var(--gray-800);font-weight:600;}

/* Context law / info compact card */
.ctx-law-card{background:var(--white);border:1px solid var(--gray-200);border-left:4px solid var(--blue-primary);border-radius:10px;padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.04);display:inline-flex;flex-direction:column;gap:3px;}
.ctx-law-title{font-size:11px;font-weight:700;color:var(--gray-800);text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px;}
.ctx-law-sub{font-size:12px;color:var(--gray-600);line-height:1.5;}
.ctx-law-sub strong{color:var(--gray-700);font-weight:600;}

/* KPI Execution Card */
.kpi-card{background:var(--white);border:1px solid var(--gray-200);border-radius:14px;padding:14px 16px;box-shadow:0 1px 4px rgba(0,0,0,.04);height:100%;}
.kpi-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.kpi-card-title{font-size:14px;font-weight:700;color:var(--gray-800);}
.kpi-pill{background:var(--blue-light);color:var(--blue-primary);font-size:11px;font-weight:600;padding:3px 10px;border-radius:20px;}
.kpi-ring-wrap{position:relative;width:120px;height:120px;margin:0 auto 12px;}
.kpi-ring{width:120px;height:120px;}
.kpi-ring-val{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-size:22px;font-weight:700;color:var(--gray-800);}
.kpi-note{text-align:center;font-size:12px;color:var(--gray-500);margin-bottom:14px;}
.kpi-bars{display:flex;flex-direction:column;gap:8px;}
.kpi-bar-item{display:flex;align-items:center;gap:8px;font-size:12px;}
.kpi-bar-item .lbl{width:80px;color:var(--gray-600);font-weight:500;flex-shrink:0;}
.kpi-track{flex:1;height:8px;background:var(--gray-200);border-radius:4px;overflow:hidden;}
.kpi-fill{height:100%;border-radius:4px;transition:width .6s ease;}
.kpi-bar-item .val{width:30px;text-align:right;font-family:var(--font-mono);font-weight:600;color:var(--gray-700);}
/* --- Trix / ActionText editor ---------------------------------- */
trix-editor {
  min-height: 350px;
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #ced4da;
  border-radius: 0 0 0.25rem 0.25rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
}
trix-toolbar .trix-button-group {
  border-color: #ced4da;
}
trix-toolbar {
  border: 1px solid #ced4da;
  border-bottom: none;
  border-radius: 0.25rem 0.25rem 0 0;
  background: #f8f9fa;
  padding: 4px;
}

/* --- Summernote editor (doc content) --------------------------- */
#doc_content_summernote + .note-editor.note-frame {
  border: none;
  border-radius: 0;
}
#doc_content_summernote + .note-editor {
  overflow: visible !important;
}
#doc_content_summernote + .note-editor .note-toolbar {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 4px 6px;
  overflow: visible !important;
  position: relative;
  z-index: 10;
}
/* Dropdown menu positioning — custom JS handler calls .show()/.hide() directly */
.note-editor .note-toolbar .note-btn-group,
.note-editor .note-toolbar .btn-group {
  position: relative;
}
.note-editor .note-toolbar .note-dropdown-menu,
.note-editor .note-toolbar .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  z-index: 9999 !important;
  min-width: 10rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 0.25rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}
#doc_content_summernote + .note-editor .note-editable {
  background: #fff;
  font-size: 14px;
  line-height: 1.7;
  padding: 16px 20px;
}
#doc_content_summernote + .note-editor .note-statusbar {
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

/* --- Summernote content display (show pages) ------------------- */
/* .doc-content-body renders raw HTML from Summernote (.body.to_html).
   Bootstrap resets some styles; we restore them here. */
.doc-content-body { line-height: 1.7; font-size: 14px; }
.doc-content-body p  { margin-bottom: 0.5rem; }

/* Alignment — Summernote uses inline style="text-align:..."; no override needed,
   but Bootstrap normalises some elements so we ensure inherit doesn't break them */
.doc-content-body h1, .doc-content-body h2,
.doc-content-body h3, .doc-content-body h4,
.doc-content-body h5, .doc-content-body h6 { margin-top: 0.75rem; margin-bottom: 0.4rem; }

/* Lists */
.doc-content-body ul { list-style: disc   !important; padding-left: 2rem !important; margin-bottom: 0.5rem; }
.doc-content-body ol { list-style: decimal !important; padding-left: 2rem !important; margin-bottom: 0.5rem; }
.doc-content-body li { display: list-item !important; }

/* Tables — cell borders are intentionally NOT overridden so Word-pasted
   inline styles (e.g. border-top only) render exactly as in the editor.
   Bootstrap .table-bordered handles cells for Summernote-created tables. */
.doc-content-body table {
  border-collapse: collapse !important;
  max-width: 100% !important;
  float: none !important;
  margin-bottom: 1rem;
  display: table !important;
}
.doc-content-body table td, .doc-content-body table th {
  padding: 0.4rem 0.6rem;
  vertical-align: top;
}
.doc-content-body table th { background: #f8f9fa; font-weight: 600; }

/* Other elements */
.doc-content-body blockquote { border-left: 4px solid #dee2e6; padding-left: 1rem; color: #6c757d; margin: 0.5rem 0; }
.doc-content-body pre  { background: #f8f9fa; border: 1px solid #dee2e6; padding: 0.75rem 1rem; border-radius: 4px; white-space: pre-wrap; }
.doc-content-body code { background: #f8f9fa; padding: 0.1em 0.35em; border-radius: 3px; font-size: 0.9em; }
.doc-content-body img  { max-width: 100%; height: auto; }

/* Tags substituídas na visualização do cliente */
.tag_key,
.tag_system {
  display: inline-block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  padding: 0.25em 0.55em;
  border-radius: 0.375rem;
  line-height: 1;
  vertical-align: baseline;
}
.tag_key    { background-color: #9f74ed; }  /* tag dinâmica*/
.tag_system { background-color: #1a6eb5; }  /* tag de sistema*/

/* --- Botões de ação em tabelas (padrão global) --- */
.btn-action {
  padding: 0.2rem 0.42rem;
  font-size: 0.75rem;
  line-height: 1.4;
  border-radius: 4px;
}

/* Flash/toast — acima de todos os elementos fixos incluindo layout-top-strip */
.toasts-top-right,
.toasts-top-left,
.toasts-bottom-right,
.toasts-bottom-left,
#toastsContainerTopRight,
#toastsContainerTopLeft,
#toastsContainerBottomRight,
#toastsContainerBottomLeft {
  position: fixed !important;
  z-index: 10000 !important;
}

/* --- Base page-action-header layout --- */
.page-action-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.page-action-header__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.page-action-header__right {
  flex: 1;
  min-width: 0;
}

/* --- Fixed page-action-header variant (Turbo-safe: use class instead of inline <style>) --- */
.page-action-header--fixed {
  position: fixed;
  top: 55px;
  left: 198px;
  right: 0;
  width: auto;
  z-index: 1055;
  background: #fff;
  padding: 8px 16px;
  border-bottom: 2px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.sidebar-collapse .page-action-header--fixed { left: 62px; }
@media (max-width: 767.98px) { .page-action-header--fixed { left: 0; } }
.page-action-header-spacer { height: 52px; }

/* Badges com borda menos arredondada e espaçamento lateral */
.badge.bg-success,
.badge.bg-secondary,
.badge.bg-primary {
  border-radius: 4px;
  padding: .35em .6em;
}

/* Menu lateral: texto à esquerda, badge à direita (qualquer badge do menu) */
.nav-sidebar .nav-link > p {
  display: flex;
  align-items: center;
}
.nav-sidebar .nav-link > p > .badge {
  margin-left: auto;
}
