:root { --sidebar: #17365d; --sidebar-2: #244a7c; --bg: #f4f7fb; }
body { background: var(--bg); font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; }
.app-shell { display: flex; width: 100%; min-height: 100dvh; }
.sidebar { width: 245px; min-height: 100dvh; height: 100dvh; background: linear-gradient(180deg, var(--sidebar), #0f2745); color: white; position: fixed; inset: 0 auto 0 0; z-index: 1040; transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
.sidebar-open .sidebar { transform: none; visibility: visible; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 1035; background: rgba(10,25,45,.5); }
.sidebar .offcanvas-body { display: block; max-height: calc(100dvh - 100px); overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.sidebar .offcanvas-body::-webkit-scrollbar { display: none; }
.sidebar .offcanvas-body > .nav { gap: .15rem !important; }
.content { margin-left: 0; min-height: 100dvh; flex: 1; min-width: 0; width: 100%; transition: margin-left .25s ease, width .25s ease; }
@media (min-width: 992px) { .sidebar-open .content { margin-left: 245px; width: calc(100% - 245px); } }
.content.content-login { margin-left: 0; width: 100%; }
.page-content-login { min-height: 100dvh; padding: 0; }
.login-page { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(440px, .96fr); min-height: 100dvh; background: #fff; color: #152238; }
.login-showcase { position: relative; display: flex; min-height: 100dvh; overflow: hidden; padding: clamp(2rem, 5vw, 5.5rem); color: #fff; background: radial-gradient(ellipse at 15% 90%, rgba(27,113,147,.45), transparent 45%), linear-gradient(145deg, #102941 0%, #102a45 48%, #173d58 100%); }
.login-showcase-inner { position: relative; z-index: 2; display: flex; flex: 1; flex-direction: column; justify-content: space-between; max-width: 740px; margin: 0 auto; }
.login-brand { display: inline-flex; align-items: center; gap: .8rem; width: fit-content; color: #fff; font-size: 1.25rem; font-weight: 700; letter-spacing: -.035em; text-decoration: none; }
.login-brand > span:last-child > span { color: #72dcc1; }
.login-brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.17); border-radius: 13px; background: rgba(255,255,255,.09); color: #72dcc1; font-size: 1.2rem; }
.login-message { max-width: 560px; padding: 5rem 0 4rem; }
.login-eyebrow { display: inline-flex; align-items: center; gap: .6rem; color: #a7c1d1; font-size: .72rem; font-weight: 700; letter-spacing: .15em; }
.login-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: #72dcc1; box-shadow: 0 0 16px rgba(114,220,193,.7); }
.login-message h1 { margin: 1.4rem 0 1.2rem; font-size: clamp(2.5rem, 4.1vw, 4.35rem); font-weight: 600; line-height: 1.1; letter-spacing: -.055em; }
.login-message h1 span { color: #72dcc1; }
.login-message > p { max-width: 410px; margin: 0; color: #b8c8d4; font-size: 1.06rem; line-height: 1.8; }
.login-capabilities { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 2.5rem; }
.login-capabilities span { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem .85rem; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background: rgba(255,255,255,.055); color: #e2edf2; font-size: .83rem; }
.login-capabilities i { color: #72dcc1; }
.login-showcase-footer { display: flex; align-items: center; justify-content: space-between; color: #94adbd; font-size: .8rem; }
.login-showcase-orbit { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; color: #72dcc1; }
.login-orb { position: absolute; z-index: 1; border: 1px solid rgba(255,255,255,.065); border-radius: 50%; pointer-events: none; }
.login-orb-one { top: 13%; right: -235px; width: 600px; height: 600px; box-shadow: 0 0 0 48px rgba(255,255,255,.018), 0 0 0 96px rgba(255,255,255,.014); }
.login-orb-two { bottom: -300px; left: -220px; width: 560px; height: 560px; box-shadow: 0 0 0 45px rgba(255,255,255,.018); }
.login-grid { position: absolute; inset: 0; z-index: 0; opacity: .12; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(135deg, black, transparent 75%); }
.login-access { display: grid; min-height: 100dvh; place-items: center; padding: 3rem clamp(2rem, 6vw, 6rem); background: linear-gradient(135deg, #fff 0%, #f8fafb 100%); }
.login-access-inner { width: min(100%, 410px); }
.login-access-heading { margin-bottom: 2.25rem; }
.login-access-icon { display: grid; width: 48px; height: 48px; margin-bottom: 1.6rem; place-items: center; border: 1px solid #dcebe8; border-radius: 14px; background: #eff8f6; color: #16745f; font-size: 1.2rem; }
.login-access-kicker { color: #14806c; font-size: .68rem; font-weight: 700; letter-spacing: .16em; }
.login-access-heading h2 { margin: .6rem 0 .45rem; color: #17283c; font-size: clamp(1.8rem, 3vw, 2.2rem); font-weight: 650; letter-spacing: -.045em; }
.login-access-heading p { margin: 0; color: #788698; font-size: .96rem; }
.login-form { display: grid; gap: 1.25rem; }
.login-field .form-label { margin-bottom: .5rem; color: #29394b; font-size: .83rem; font-weight: 600; }
.login-input-wrap { position: relative; }
.login-input-wrap > i { position: absolute; top: 50%; left: 1rem; z-index: 2; color: #8190a0; font-size: 1rem; transform: translateY(-50%); }
.login-input-wrap .form-control { min-height: 52px; padding: .8rem 1rem .8rem 2.85rem; border-color: #dce3e9; border-radius: 10px; background: #fff; color: #1e2c3b; font-size: .92rem; box-shadow: 0 1px 2px rgba(15,35,55,.025); }
.login-input-wrap .form-control::placeholder { color: #a0aab5; }
.login-input-wrap .form-control:focus { border-color: #278d79; box-shadow: 0 0 0 4px rgba(39,141,121,.12); }
.login-submit { display: flex; min-height: 52px; align-items: center; justify-content: center; gap: .65rem; margin-top: .2rem; border: 0; border-radius: 10px; background: #176f61; color: #fff; font-size: .91rem; font-weight: 600; transition: background .15s, transform .15s, box-shadow .15s; }
.login-submit:hover, .login-submit:focus-visible { background: #105b50; color: #fff; box-shadow: 0 8px 20px rgba(23,111,97,.2); transform: translateY(-1px); }
.login-submit:focus-visible { outline: 3px solid rgba(39,141,121,.25); outline-offset: 3px; }
.login-security-note { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.55rem; color: #8793a0; font-size: .75rem; text-align: center; }
.login-security-note i { color: #21816d; }
.login-copyright { margin-top: 3.3rem; color: #9aa4ae; font-size: .7rem; text-align: center; }
.login-copyright span { padding: 0 .3rem; color: #c0c8ce; }
.access-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 1.5rem; }
.access-tabs { gap: .5rem; margin-bottom: 1.5rem; }
.access-tabs .nav-link { border-radius: .6rem; }
.access-matrix input { width: 1.15rem; height: 1.15rem; }
@media (max-width: 991.98px) { .access-layout { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .login-page { grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); }
  .login-showcase { padding: 2.5rem; }
  .login-access { padding: 2.5rem; }
}
@media (max-width: 700px) {
  .login-page { grid-template-columns: 1fr; }
  .login-showcase { min-height: auto; padding: 1.5rem 1.4rem 1.7rem; }
  .login-showcase-inner { width: 100%; }
  .login-brand { font-size: 1.08rem; }
  .login-brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .login-message { padding: 2.5rem 0 1rem; }
  .login-message h1 { margin: 1rem 0 .75rem; font-size: clamp(2rem, 8vw, 2.8rem); }
  .login-message > p { max-width: 390px; font-size: .9rem; }
  .login-capabilities { gap: .45rem; margin-top: 1.3rem; }
  .login-capabilities span { padding: .48rem .62rem; font-size: .74rem; }
  .login-showcase-footer, .login-orb, .login-grid { display: none; }
  .login-access { min-height: auto; padding: 2.5rem 1.4rem 2rem; background: #fff; }
  .login-access-inner { width: min(100%, 460px); }
  .login-access-heading { margin-bottom: 1.6rem; }
  .login-access-icon { display: none; }
  .login-access-heading h2 { font-size: 1.7rem; }
  .login-copyright { margin-top: 2rem; }
}
.page-content { padding: 1.5rem; }
.topbar-heading { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand { font-weight: 700; font-size: 1.2rem; }
.sidebar .nav-link { color: rgba(255,255,255,.84); border-radius: .55rem; padding: .5rem .8rem; }
.sidebar .nav-link.active { background: rgba(255,255,255,.13); color: white; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.10); color: white; }
.sidebar .nav-link i { width: 24px; display: inline-block; }
.topbar { height: 76px; padding: 0 1.5rem; background: white; border-bottom: 1px solid #e6ebf2; position: sticky; top: 0; z-index: 5; }
.metric-card, .panel-card { border: 0; border-radius: 14px; box-shadow: 0 4px 18px rgba(24,54,93,.07); }
.metric-icon { font-size: 1.25rem; color: #244a7c; }
.metric-label { font-size: .78rem; color: #718096; margin-top: .55rem; }
.metric-value { font-size: 1.2rem; font-weight: 700; margin-top: .2rem; }
.panel-card .card-header { background: white; border-bottom: 1px solid #eef2f7; font-weight: 700; padding: 1rem 1.15rem; }
.table thead th { font-size: .77rem; color: #5f6b7a; text-transform: uppercase; letter-spacing: .02em; background: #f8fafc; white-space: nowrap; }
@media (max-width: 991.98px) {
  .sidebar { width: min(280px, 85vw); }
  .sidebar-open .sidebar-backdrop { display: block; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .content { transition: none; } }
@media (prefers-reduced-motion: reduce) { .login-submit { transition: none; } }
@media (max-width: 575.98px) {
  .page-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
  .topbar h1 { font-size: 1.1rem; }
  .topbar small { font-size: .7rem; }
}

/* A mesma linguagem de ações em todo o módulo. */
.action-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid #dce5ef; border-radius: 11px; background: #fff; color: #44617f; text-decoration: none; font-size: 1.05rem; transition: background .15s, border-color .15s, box-shadow .15s; }
.action-icon:hover { color: #173f70; background: #edf3fa; border-color: #adc2db; }
.action-icon:focus-visible { outline: 3px solid #94bdfa; outline-offset: 3px; }
.action-icon--principal { background: #1c5fc4; border-color: #1c5fc4; color: #fff; }
.action-icon--principal:hover { background: #164d9e; border-color: #164d9e; color: #fff; box-shadow: 0 4px 12px #1c5fc424; }
.action-icon--aportes { color: #137154; background: #eff9f4; border-color: #d6ebdf; }
.action-icon--aportes:hover { color: #0b5c42; background: #dff2e8; border-color: #add6bf; }
.action-icon--retornos { color: #5b53aa; background: #f4f2fd; border-color: #e3dff6; }
.action-icon--retornos:hover { color: #423985; background: #ebe6fa; border-color: #c6bde7; }
.action-icon--salvar { color: #fff; background: #137154; border-color: #137154; }
.action-icon--salvar:hover { color: #fff; background: #0c5a41; border-color: #0c5a41; }
.action-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.action-group form { display: inline-flex; margin: 0; }
.action-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .75rem; color: #708095; }
.action-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.action-legend i { color: #47688c; }
@media (pointer: coarse) { .action-icon { width: 44px; height: 44px; flex-basis: 44px; } }
@media (prefers-reduced-motion: reduce) { .action-icon { transition: none; } }


.sidebar-security > summary { display: flex; align-items: center; gap: 0; list-style: none; cursor: pointer; }
.sidebar-security > summary::-webkit-details-marker { display: none; }
.sidebar-security > summary::marker { content: ""; }
.sidebar-security > summary .sidebar-security-chevron { width: auto; margin-left: auto; font-size: .75rem; transition: transform .15s; }
.sidebar-security[open] > summary .sidebar-security-chevron { transform: rotate(180deg); }
.sidebar-security-items { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px 23px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.16); }
.sidebar-security-items .nav-link { padding: .45rem .7rem; font-size: .86rem; }
.sidebar-security > summary:focus-visible { outline: 2px solid #b8d7fa; outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .sidebar-security > summary .sidebar-security-chevron { transition: none; } }
