/* ===== Login ===== */
.login-page { min-height: 100svh; position: relative; display: grid; place-items: center; padding: 24px; overflow: hidden; }
.login-page .hero-bg { position: fixed; }
.login-voltar { position: absolute; top: 18px; left: 18px; z-index: 2; }
.login-centro { position: relative; z-index: 1; width: min(440px, 100%); display: flex; flex-direction: column; gap: 22px; }
.login-card { border-radius: 32px; padding: 38px; border: 1px solid var(--line); box-shadow: var(--shadow-3); animation: scale-in .8s var(--ease-out) both; transition: opacity .35s, transform .35s var(--ease); }
.login-card.saindo { opacity: 0; transform: scale(1.04) translateY(-8px); }
.login-head { text-align: center; margin-bottom: 26px; }
.login-logo { width: 68px; height: 68px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); display: grid; place-items: center; margin: 0 auto 20px; animation: float 6s ease-in-out infinite; }
.login-head h1 { font-size: 1.9rem; letter-spacing: -.035em; margin-bottom: 8px; }
.login-aviso { background: var(--bad-wash); color: var(--bad); padding: 12px 14px; border-radius: var(--r-sm); font-weight: 600; font-size: .9rem; animation: fade-up .3s var(--ease-out); }
.login-foot { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 22px; font-size: .8rem; color: var(--ink-3); }
.login-foot .ico { width: 15px; height: 15px; }
.login-nota { text-align: center; font-size: .85rem; color: var(--ink-3); }

/* ===== App ===== */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100svh; transition: grid-template-columns var(--t) var(--ease-out); }
.side { position: sticky; top: 0; height: 100svh; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 70%, var(--bg)); overflow-y: auto; }
.side .brand { padding: 6px 10px 18px; }
.nav-i { position: relative; display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 14px; font-weight: 600; font-size: .94rem; color: var(--ink-2); transition: background var(--t-fast), color var(--t-fast), transform var(--t) var(--ease-out); }
.nav-i .ico { transition: transform var(--t) var(--spring); }
.nav-i:hover { background: var(--bg-2); color: var(--ink); }
.nav-i:hover .ico { transform: scale(1.12) rotate(-4deg); }
.nav-i[aria-current="page"] { background: var(--brand-wash); color: var(--brand); }
.nav-i[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.side .secao { margin: 16px 12px 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-3); }
.side .fim { margin-top: auto; }
.empresa-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: box-shadow var(--t), transform var(--t-fast); }
.empresa-btn:hover { box-shadow: var(--shadow-2); }
.empresa-btn .logo { width: 36px; height: 36px; border-radius: 11px; background: var(--brand-wash); color: var(--brand); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; }
.empresa-btn .logo img { width: 100%; height: 100%; object-fit: cover; }
.empresa-btn small { display: block; color: var(--ink-3); font-size: .72rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 3vw, 36px); background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-bottom: 1px solid var(--line); }
.topbar .busca { flex: 1; max-width: 460px; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 99px; background: var(--bg-2); border: 1px solid transparent; color: var(--ink-3); font-size: .9rem; transition: background var(--t-fast), border-color var(--t-fast); text-align: left; }
.topbar .busca:hover { background: var(--surface); border-color: var(--line-strong); }
.topbar .busca .kbd { margin-left: auto; }
.topbar .titulo-mobile { display: none; font-weight: 700; }
.content { width: min(1240px, 100%); margin-inline: auto; padding: clamp(22px, 3.4vw, 44px) clamp(16px, 3vw, 36px) 110px; flex: 1; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.04em; font-weight: 800; }
.page-head p { color: var(--ink-2); margin-top: 6px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; transition: color var(--t-fast), transform var(--t) var(--ease-out); }
.crumb:hover { color: var(--brand); transform: translateX(-3px); }

.tabbar { display: none; }
@media (max-width: 980px) {
  :root { --side-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar .titulo-mobile { display: block; }
  .topbar .busca { max-width: none; flex: 0 0 auto; width: 40px; padding: 0; justify-content: center; }
  .topbar .busca span, .topbar .busca .kbd { display: none; }
  .topbar .grow { flex: 1; }
  .tabbar { display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); height: 66px; padding: 6px; gap: 2px; border-radius: 26px; background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border: 1px solid var(--line); box-shadow: var(--shadow-3); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; border-radius: 20px; font-size: .68rem; font-weight: 600; color: var(--ink-3); transition: background var(--t-fast), color var(--t-fast), transform var(--t) var(--spring); }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--brand); background: var(--brand-wash); }
  .tabbar a:active, .tabbar button:active { transform: scale(.92); }
  .content { padding-bottom: 120px; }
}

/* ===== Painel inicial ===== */
.hello h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); letter-spacing: -.045em; font-weight: 800; line-height: 1.04; }
.hello p { margin-top: 10px; color: var(--ink-2); font-size: 1.1rem; }
.bento-app { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-top: 30px; }
.mod-card { position: relative; border-radius: var(--r-xl); padding: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; display: flex; flex-direction: column; gap: 14px; min-height: 250px; transition: transform .5s var(--ease-out), box-shadow .5s; isolation: isolate; }
.mod-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), var(--brand-wash), transparent 62%); }
.mod-card:hover { box-shadow: var(--shadow-3); }
.mod-card:hover::before { opacity: 1; }
.mod-card .top { display: flex; align-items: center; justify-content: space-between; }
.mod-card .chip { width: 46px; height: 46px; border-radius: 15px; background: var(--brand-wash); color: var(--brand); display: grid; place-items: center; transition: transform .5s var(--spring); }
.mod-card:hover .chip { transform: rotate(-8deg) scale(1.1); }
.mod-card h2 { font-size: 1.25rem; letter-spacing: -.025em; }
.mod-card .big { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.mod-card .kv { display: flex; gap: 22px; flex-wrap: wrap; margin-top: auto; }
.mod-card .kv small { display: block; color: var(--ink-3); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.mod-card .kv b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mod-card .go { position: absolute; right: 22px; bottom: 22px; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; transform: translateX(8px) scale(.8); opacity: 0; transition: all .4s var(--spring); }
.mod-card:hover .go { opacity: 1; transform: none; }
.m-gestao { grid-column: span 6; } .m-orc { grid-column: span 3; } .m-contr { grid-column: span 3; }
.m-ativ { grid-column: span 8; } .m-rap { grid-column: span 4; }
.m-gestao .mini { position: absolute; right: 0; left: 0; bottom: 0; width: 100%; height: 90px; opacity: .9; z-index: -1; }
.mini-linha { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease-out) .3s forwards; }
.mini-area { opacity: 0; animation: fade-in 1s .8s forwards; }
@media (max-width: 1100px) { .m-gestao { grid-column: span 12; } .m-orc, .m-contr { grid-column: span 6; } .m-ativ { grid-column: span 12; } .m-rap { grid-column: span 12; } }
@media (max-width: 640px) { .m-orc, .m-contr { grid-column: span 12; } .mod-card { min-height: 0; padding: 22px; } }
.quick { display: grid; gap: 10px; }
.quick a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); font-weight: 600; transition: transform .35s var(--ease-out), border-color .2s, background .2s; }
.quick a:hover { transform: translateX(6px); border-color: var(--brand); background: var(--brand-wash); }
.quick a .ico:first-child { color: var(--brand); }
.feed { display: flex; flex-direction: column; }
.feed .ev { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.feed .ev:last-child { border: 0; }
.feed .ev .pt { width: 34px; height: 34px; border-radius: 11px; background: var(--bg-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.feed .ev .pt .ico { width: 17px; height: 17px; }
.feed .ev b { font-weight: 600; }
.feed .ev small { color: var(--ink-3); display: block; }

/* ===== Gráficos ===== */
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.chart .eixo { fill: var(--ink-3); font-size: 11px; font-weight: 600; }
.chart .barra { animation: grow-y .9s var(--ease-out) both; transition: opacity .2s; }
.chart .grupo:hover .barra { opacity: .85; filter: brightness(1.1); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: .82rem; box-shadow: var(--shadow-2); white-space: nowrap; }
.chart-tip .tip-l { display: flex; align-items: center; gap: 7px; margin-top: 4px; }
.chart-tip i { width: 8px; height: 8px; border-radius: 50%; }
.legenda { display: flex; gap: 18px; margin-top: 10px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.legenda span { display: inline-flex; align-items: center; gap: 7px; }
.legenda i { width: 10px; height: 10px; border-radius: 4px; }
.rosca-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.rosca-svg { position: relative; flex: none; }
.rosca .fatia { animation: fade-in .6s both; }
.rosca-centro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.rosca-centro small { color: var(--ink-3); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.rosca-centro b { font-size: 1.2rem; letter-spacing: -.02em; }
.rosca-legenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; min-width: 180px; }
.rosca-legenda li { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.rosca-legenda i { width: 10px; height: 10px; border-radius: 4px; flex: none; }
