/* Central de Manuais — hub interno. Design "Cobalt" (marca #2E54A8). */
:root{
  --brand:#2E54A8;--brand-700:#203A78;--brand-soft:#EEF2FB;--brand-softer:#D8E0F4;
  --bg:#F7F9FC;--surface:#fff;--surface-2:#F1F4F9;--surface-3:#E7ECF3;
  --border:#D5DCE7;--border-strong:#B7C1D1;
  --text:#141A26;--muted:#626C82;--faint:#8A94A8;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  --sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --sidebar:288px;--header-h:60px;--r:10px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --brand:#5A7BC6;--brand-700:#8AA0DA;--brand-soft:#1C2A4D;--brand-softer:#233461;
  --bg:#0E1320;--surface:#141A26;--surface-2:#1F2637;--surface-3:#252d40;
  --border:#333B50;--border-strong:#48526A;--text:#F7F9FC;--muted:#8A94A8;--faint:#626C82;
}}
:root[data-theme="dark"]{
  --brand:#5A7BC6;--brand-700:#8AA0DA;--brand-soft:#1C2A4D;--brand-softer:#233461;
  --bg:#0E1320;--surface:#141A26;--surface-2:#1F2637;--surface-3:#252d40;
  --border:#333B50;--border-strong:#48526A;--text:#F7F9FC;--muted:#8A94A8;--faint:#626C82;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--text);font-family:var(--sans);font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased;display:grid;grid-template-columns:var(--sidebar) 1fr;grid-template-rows:var(--header-h) 1fr;grid-template-areas:"brand header" "sidebar main"}
a{color:inherit;text-decoration:none}

/* brand corner */
.brand{grid-area:brand;display:flex;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid var(--border);border-right:1px solid var(--border);background:var(--surface)}
.brand img{width:28px;height:28px;object-fit:contain}
.brand b{font-weight:800;letter-spacing:-.02em;font-size:15px}
.brand b span{color:var(--brand)}

/* header */
.header{grid-area:header;display:flex;align-items:center;gap:14px;padding:0 20px;border-bottom:1px solid var(--border);background:var(--surface)}
.header .doc-title{font-weight:700;font-size:15px}
.header .doc-meta{font-size:12px;color:var(--faint)}
.header .grow{flex:1}
.header .hbtn{height:34px;padding:0 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--muted);font:inherit;font-size:12.5px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.header .hbtn:hover{color:var(--text);border-color:var(--border-strong)}
.header .hbtn svg{width:15px;height:15px}

/* sidebar */
.sidebar{grid-area:sidebar;border-right:1px solid var(--border);background:var(--surface);overflow-y:auto;padding:14px 12px 40px}
.search{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--border);border-radius:9px;padding:8px 11px;margin-bottom:16px}
.search input{border:0;background:transparent;color:var(--text);font:inherit;font-size:13px;width:100%;outline:none}
.search svg{width:15px;height:15px;color:var(--faint);flex:none}
.cat{margin-bottom:8px}
.cat-title{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--faint);font-weight:700;padding:10px 10px 6px}
.item{display:block;padding:9px 11px;border-radius:8px;cursor:pointer;border:1px solid transparent;margin-bottom:2px}
.item:hover{background:var(--surface-2)}
.item.active{background:var(--brand-soft);border-color:var(--brand-softer)}
.item .it-title{font-weight:600;font-size:13.5px;color:var(--text)}
.item.active .it-title{color:var(--brand)}
.item .it-desc{font-size:11.5px;color:var(--muted);margin-top:2px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.item .it-date{font-size:10.5px;color:var(--faint);font-family:var(--mono);margin-top:4px}
.empty{color:var(--faint);font-size:12.5px;padding:12px 10px}

/* main */
.main{grid-area:main;position:relative;background:var(--bg);overflow:hidden}
.main iframe{width:100%;height:100%;border:0;display:block;background:var(--surface)}
/* welcome */
.welcome{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px}
.welcome.hide{display:none}
.welcome .wlogo{width:66px;height:66px;border-radius:16px;background:var(--brand-soft);border:1px solid var(--brand-softer);display:grid;place-items:center;margin-bottom:22px}
.welcome .wlogo img{width:38px;height:38px}
.welcome h1{font-size:26px;font-weight:800;letter-spacing:-.02em;margin:0 0 8px}
.welcome p{color:var(--muted);max-width:46ch;font-size:15px}
.welcome .cards{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:26px}
.welcome .wc{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:16px 18px;width:230px;text-align:left;cursor:pointer;transition:border-color .15s,transform .15s}
.welcome .wc:hover{border-color:var(--brand-softer);transform:translateY(-2px)}
.welcome .wc .t{font-weight:700;font-size:14px}
.welcome .wc .d{font-size:12px;color:var(--muted);margin-top:4px}
.welcome .count{font-size:12px;color:var(--faint);margin-top:20px;font-family:var(--mono)}

/* mobile */
.burger{display:none}
@media(max-width:820px){
  body{grid-template-columns:1fr;grid-template-areas:"header" "main"}
  .brand{display:none}
  .sidebar{position:fixed;top:0;left:0;bottom:0;width:280px;z-index:40;transform:translateX(-100%);transition:transform .2s}
  .sidebar.open{transform:none;box-shadow:0 0 40px rgba(0,0,0,.3)}
  .burger{display:inline-grid;place-items:center;width:34px;height:34px;border:1px solid var(--border);border-radius:8px;background:var(--surface);cursor:pointer}
  .burger svg{width:18px;height:18px}
}
