/* Estilos globais complementares do Lacius. */
.brand-lockup {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.brand-logo-header {
    height: 48px;
    filter: drop-shadow(0 12px 24px rgba(16, 185, 129, .14));
    transition: transform .18s ease, filter .18s ease;
}

.brand-lockup-public:hover .brand-logo-header {
    transform: translateY(-1px);
    filter: drop-shadow(0 16px 30px rgba(16, 185, 129, .22));
}

.brand-logo-mobile-symbol {
    height: 38px;
    width: 38px;
    filter: drop-shadow(0 10px 20px rgba(16, 185, 129, .18));
}

.brand-lockup-sidebar {
    display: grid;
    gap: 3px;
}

.brand-logo-sidebar {
    height: 52px;
    width: 218px;
    max-width: 100%;
}

.brand-subtitle {
    margin-left: 77px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
}

.landing-brand-card {
    display: inline-flex;
    align-items: center;
    width: min(100%, 360px);
    padding: 10px 14px 10px 10px;
    border: 1px solid rgba(52, 211, 153, .16);
    border-radius: 18px;
    background: rgba(2, 6, 23, .44);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .04);
    backdrop-filter: blur(18px);
}

.landing-brand-card img {
    height: 60px;
}

.landing-brand-panel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(30, 41, 59, .9);
    background:
        linear-gradient(145deg, rgba(15, 23, 42, .94), rgba(2, 6, 23, .86)),
        radial-gradient(circle at 74% 18%, rgba(20, 184, 166, .22), transparent 34%);
    box-shadow: 0 26px 80px rgba(0, 0, 0, .38);
}

.landing-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(148, 163, 184, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(140deg, black, transparent 78%);
}

.landing-brand-panel > * {
    position: relative;
}

.landing-brand-panel-logo {
    width: min(100%, 286px);
}

@media (max-width: 760px) {
    .brand-logo-header {
        height: 42px;
        max-width: 210px;
    }

    .brand-logo-sidebar {
        height: 48px;
        width: 202px;
    }

    .brand-subtitle {
        margin-left: 70px;
    }
}

.btn-modulo-principal {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: 12px;
    background-color: #00C980;
    color: #030712;
    font-size: 0.875rem;
    font-weight: 900;
    letter-spacing: 0.025em;
    border: 0;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -4px rgba(16, 185, 129, 0.1);
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.btn-modulo-principal:hover {
    background-color: #00b366;
}

/* Janela lateral global para listas dos mÃ³dulos. Replica o comportamento do painel de documentos. */
.sgq-side-sheet {
    position: fixed;
    inset-block: 0;
    right: 0;
    z-index: 920;
    width: min(100vw, 720px);
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, .1);
    background: #020617;
    box-shadow: -28px 0 80px rgba(0, 0, 0, .55);
    color: #e2e8f0;
    opacity: 0;
    overscroll-behavior: contain;
    transform: translateX(34px);
    transition: transform 260ms cubic-bezier(.2, .8, .2, 1), opacity 220ms ease;
    will-change: transform, opacity;
}

.sgq-side-sheet.hidden {
    display: none;
}

.sgq-side-sheet.is-open {
    opacity: 1;
    transform: translateX(0);
}

.sgq-side-sheet.is-closing {
    opacity: 0;
    pointer-events: none;
    transform: translateX(34px);
}

.sgq-side-sheet-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: block;
    padding: 28px 64px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(2, 6, 23, .94);
    text-align: center;
    backdrop-filter: blur(16px);
}

.sgq-side-sheet-kicker {
    margin: 0;
    color: #34d399;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.sgq-side-sheet-title {
    margin: 10px auto 0;
    max-width: 560px;
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.16;
}

.sgq-side-sheet-subtitle {
    margin: 8px auto 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sgq-side-sheet-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 40px;
    height: 40px;
    min-height: 40px;
    place-items: center;
    border: 1px solid #334155;
    border-radius: 12px;
    background: #0f172a;
    color: #cbd5e1;
    font-weight: 900;
}

.sgq-side-sheet-body,
.sgq-side-sheet-actions {
    width: min(calc(100% - 40px), 620px);
    margin-inline: auto;
}

.sgq-side-sheet-body {
    display: grid;
    gap: 14px;
    padding-block: 24px 28px;
}

.sgq-side-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sgq-side-sheet-card,
.sgq-side-sheet-section {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 16px;
    background: rgba(15, 23, 42, .74);
    padding: 16px;
    text-align: center;
}

.sgq-side-sheet-card span,
.sgq-side-sheet-section h3 {
    display: block;
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sgq-side-sheet-card strong,
.sgq-side-sheet-section p {
    display: block;
    margin: 7px 0 0;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.sgq-side-sheet-actions {
    display: grid;
    gap: 0;
    padding-bottom: 28px;
    text-align: center;
}

.sgq-side-sheet-actions [data-side-sheet-extra-actions] {
    display: contents;
}

.sgq-side-sheet-label {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sgq-side-sheet-actions a,
.sgq-side-sheet-actions button {
    min-height: 42px;
    text-decoration: none;
}

.training-side-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.training-side-sheet-grid > a,
.training-side-sheet-grid > button {
    min-height: 46px;
    padding: 12px 14px;
    text-align: center;
    font-weight: 600;
}

.training-side-sheet-grid .training-drawer-history {
    grid-column: span 2;
    width: 100%;
    margin-top: 4px;
}

@media (max-width: 420px) {
    .training-side-sheet-grid {
        grid-template-columns: 1fr;
    }

    .training-side-sheet-grid .training-drawer-history {
        grid-column: span 1;
    }
}

body.sgq-side-sheet-lock {
    overflow: hidden;
}

body.sgq-side-sheet-scroll-lock {
    overflow: hidden;
}

.sgq-side-sheet-inner {
    width: min(100%, 620px);
    min-height: 100%;
    margin: 0 auto;
}

.sgq-side-sheet-meta,
.sgq-side-sheet-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sgq-side-sheet-card p,
.sgq-side-sheet-card-label {
    display: block;
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sgq-side-sheet-card-value {
    display: block;
    margin: 7px 0 0;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.sgq-side-sheet-section-title {
    margin: 0 0 12px;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sgq-side-sheet-description {
    margin: 10px 0 0;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    white-space: pre-wrap;
}

@media (max-width: 760px) {
    .sgq-side-sheet {
        inset: 0;
        width: 100vw;
        border-left: 0;
    }

    .sgq-side-sheet-head {
        padding: 64px 18px 18px;
    }

    .sgq-side-sheet-title {
        font-size: 22px;
    }

    .sgq-side-sheet-grid {
        grid-template-columns: 1fr;
    }

    .sgq-side-sheet-meta,
    .sgq-side-sheet-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgq-side-sheet {
        transition: none;
        transform: none;
    }
}

.btn-modulo-secundario {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: 12px;
    background-color: #090d16;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    border: 1px solid rgba(30, 41, 59, 0.8);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.btn-modulo-secundario:hover {
    background-color: #111726;
    border-color: rgba(51, 65, 85, 0.8);
}

.btn-modulo-principal:active,
.btn-modulo-secundario:active {
    transform: scale(0.98);
}

@media (min-width: 640px) {
    .btn-modulo-principal,
    .btn-modulo-secundario {
        width: 192px;
    }
}

/* Sidebar premium */
.sidebar-shell {
    background: #020617;
    color: #f8fafc;
    box-shadow: 18px 0 55px rgba(0, 0, 0, .32);
    overflow: hidden;
    transition: width .32s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease;
    will-change: width;
}

.app-shell {
    transition: grid-template-columns .32s cubic-bezier(.22, 1, .36, 1);
}

.sidebar-head {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
}

.sidebar-collapse-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid rgba(30, 41, 59, .96);
    border-radius: 12px;
    background: rgba(15, 23, 42, .76);
    color: #94a3b8;
    transition: background .22s ease, border-color .22s ease, color .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1), opacity .22s ease;
}

.sidebar-collapse-button:hover,
.sidebar-collapse-button:focus-visible {
    border-color: rgba(16, 185, 129, .42);
    background: rgba(16, 185, 129, .1);
    color: #d1fae5;
}

.sidebar-collapse-button svg,
.sidebar-collapse-button i {
    width: 18px;
    height: 18px;
    transition: transform .2s ease;
}

.sidebar-brand {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    border-radius: 14px;
    color: #f8fafc;
    text-decoration: none;
    transition: background .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1), opacity .22s ease;
}

.sidebar-brand:hover {
    transform: translateX(1px);
}

.sidebar-brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(51, 65, 85, .72);
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(15, 23, 42, .95), rgba(2, 6, 23, .78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.sidebar-brand-mark img {
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.sidebar-brand-title {
    display: block;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
}

.sidebar-brand-subtitle,
.sidebar-eyebrow {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sidebar-search {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(30, 41, 59, .92);
    border-radius: 13px;
    background: rgba(15, 23, 42, .62);
    color: #64748b;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.sidebar-search:focus-within {
    border-color: rgba(16, 185, 129, .42);
    background: rgba(15, 23, 42, .9);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .08);
}

.sidebar-search svg,
.sidebar-search i {
    width: 17px;
    height: 17px;
}

.sidebar-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #e2e8f0;
    font-size: 12.5px;
    font-weight: 650;
}

.sidebar-search input::placeholder {
    color: #64748b;
}

.sidebar-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-scroll::-webkit-scrollbar {
    display: none;
}

.sidebar-section {
    display: grid;
    gap: 6px;
    padding-top: 14px;
}

.sidebar-section + .sidebar-section {
    margin-top: 4px;
}

.sidebar-section-title {
    padding: 0 10px 5px;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.sidebar-link,
.sidebar-toggle {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 41px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 750;
    text-align: left;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sidebar-link:hover,
.sidebar-toggle:hover {
    border-color: rgba(51, 65, 85, .9);
    background: rgba(30, 41, 59, .72);
    color: #f8fafc;
    transform: translateX(2px);
}

.sidebar-link.is-active {
    border-color: rgba(16, 185, 129, .34);
    background: linear-gradient(90deg, rgba(16, 185, 129, .18), rgba(16, 185, 129, .06));
    color: #d1fae5;
    box-shadow: inset 3px 0 0 #10b981, 0 10px 26px rgba(16, 185, 129, .08);
    transform: translateX(3px);
}

.sidebar-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .82);
    color: #94a3b8;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-toggle:hover .sidebar-icon,
.sidebar-link.is-active .sidebar-icon {
    background: rgba(16, 185, 129, .14);
    color: #6ee7b7;
}

.sidebar-icon svg,
.sidebar-icon i,
.sidebar-chevron svg,
.sidebar-chevron i,
.sidebar-badge svg {
    width: 16px;
    height: 16px;
}

.sidebar-chevron {
    display: grid;
    place-items: center;
    color: #64748b;
    transition: transform .16s ease, color .16s ease;
}

.sidebar-toggle[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
    color: #6ee7b7;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(30, 41, 59, .95);
    color: #94a3b8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .03em;
}

.sidebar-badge-danger {
    background: rgba(244, 63, 94, .18);
    color: #fda4af;
}

.sidebar-subnav {
    display: grid;
    gap: 4px;
    margin: 4px 0 0 15px;
    padding-left: 12px;
    border-left: 1px solid rgba(51, 65, 85, .86);
}

.sidebar-subnav .sidebar-link {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 36px;
    padding-block: 4px;
    color: #94a3b8;
    font-size: 12.5px;
}

.sidebar-subnav .sidebar-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
}

.sidebar-footer {
    border-top: 1px solid rgba(30, 41, 59, .95);
    background: linear-gradient(180deg, rgba(2, 6, 23, .88), #020617);
}

.language-flag {
    display: block;
    width: 28px;
    height: 19px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
}

.sidebar-user-menu-wrap {
    position: relative;
}

.sidebar-user-trigger {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 7px;
    border: 1px solid rgba(30, 41, 59, .95);
    border-radius: 14px;
    background: rgba(15, 23, 42, .58);
    color: #e2e8f0;
    text-align: left;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.sidebar-user-trigger:hover,
.sidebar-user-trigger.is-open {
    border-color: rgba(16, 185, 129, .34);
    background: rgba(30, 41, 59, .72);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.sidebar-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, .24), rgba(20, 184, 166, .12));
    color: #a7f3d0;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .24);
}

.sidebar-user-trigger-copy {
    min-width: 0;
}

.sidebar-user-trigger-copy span,
.sidebar-user-trigger-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-trigger-copy span {
    color: #f8fafc;
    font-size: 13px;
    font-weight: 850;
}

.sidebar-user-trigger-copy small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 650;
}

.sidebar-user-trigger > svg,
.sidebar-user-trigger > i {
    width: 16px;
    height: 16px;
    color: #64748b;
}

.sidebar-user-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 1500;
    display: grid;
    gap: 4px;
    width: min(280px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(51, 65, 85, .82);
    border-radius: 16px;
    background: rgba(2, 6, 23, .86);
    box-shadow: 0 26px 80px rgba(0, 0, 0, .5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s cubic-bezier(.2, .8, .2, 1);
}

.sidebar-user-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.sidebar-user-menu a,
.sidebar-user-menu-language,
.sidebar-user-menu-company {
    border-radius: 12px;
}

.sidebar-user-menu a {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 760;
    text-decoration: none;
    transition: background .16s ease, color .16s ease;
}

.sidebar-user-menu a:hover {
    background: rgba(30, 41, 59, .8);
    color: #f8fafc;
}

.sidebar-user-menu a.is-danger {
    color: #fda4af;
}

.sidebar-user-menu a.is-danger:hover {
    background: rgba(244, 63, 94, .12);
    color: #fecdd3;
}

.sidebar-user-menu a svg,
.sidebar-user-menu a i,
.sidebar-user-menu-language svg,
.sidebar-user-menu-language i {
    width: 16px;
    height: 16px;
}

.sidebar-user-menu-profile {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    min-height: 54px !important;
    padding: 8px !important;
    background: rgba(15, 23, 42, .62);
}

.sidebar-user-menu-profile strong,
.sidebar-user-menu-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-menu-profile strong {
    color: #f8fafc;
    font-size: 13px;
    font-weight: 900;
}

.sidebar-user-menu-profile small {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 650;
}

.sidebar-user-menu-company {
    padding: 4px 10px 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
}

.sidebar-user-menu-language {
    display: grid;
    gap: 8px;
    padding: 9px 10px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 760;
}

.sidebar-user-menu-language > span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-menu-language > div {
    display: flex;
    gap: 7px;
}

.sidebar-user-menu-language a {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    min-height: 34px;
    width: 42px;
    padding: 0;
    border: 1px solid rgba(51, 65, 85, .9);
    background: rgba(15, 23, 42, .62);
}

.sidebar-user-menu-language a.is-active {
    border-color: rgba(16, 185, 129, .52);
    background: rgba(16, 185, 129, .12);
}

.mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 1px solid rgba(51, 65, 85, .9);
    border-radius: 12px;
    background: rgba(15, 23, 42, .85);
    color: #f8fafc;
}

@media (min-width: 1024px) {
    body.sidebar-collapsed .app-shell {
        grid-template-columns: 64px minmax(0, 1fr) !important;
    }

    body.sidebar-collapsed .sidebar-shell {
        width: 64px !important;
        overflow: visible;
    }

    body.sidebar-collapsed .sidebar-scroll {
        overflow: visible !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body.sidebar-collapsed .sidebar-top {
        padding: 10px !important;
    }

    body.sidebar-collapsed .sidebar-head {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 44px;
    }

    body.sidebar-collapsed .sidebar-collapse-button {
        position: absolute;
        inset: 1px auto auto 50%;
        width: 42px;
        height: 42px;
        min-height: 42px;
        border-radius: 13px;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) scale(.92);
    }

    body.sidebar-collapsed .sidebar-head:hover .sidebar-collapse-button,
    body.sidebar-collapsed .sidebar-collapse-button:focus-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) scale(1);
    }

    body.sidebar-collapsed .sidebar-collapse-button svg {
        transform: rotate(180deg);
    }

    body.sidebar-collapsed .sidebar-brand {
        display: grid;
        grid-template-columns: 42px;
        justify-content: center;
        width: 44px;
        min-height: 44px;
        padding: 1px;
        opacity: 1;
        transform: scale(1);
    }

    body.sidebar-collapsed .sidebar-head:hover .sidebar-brand,
    body.sidebar-collapsed .sidebar-head:focus-within .sidebar-brand {
        opacity: 0;
        pointer-events: none;
        transform: scale(.92);
    }

    body.sidebar-collapsed .sidebar-brand:hover {
        background: rgba(30, 41, 59, .62);
    }

    body.sidebar-collapsed .sidebar-brand > .min-w-0,
    body.sidebar-collapsed .sidebar-search,
    body.sidebar-collapsed .sidebar-user-trigger-copy,
    body.sidebar-collapsed .sidebar-user-trigger > svg,
    body.sidebar-collapsed .sidebar-section-title,
    body.sidebar-collapsed .sidebar-badge,
    body.sidebar-collapsed .sidebar-chevron,
    body.sidebar-collapsed .sidebar-eyebrow,
    body.sidebar-collapsed .sidebar-link > span:not(.sidebar-icon),
    body.sidebar-collapsed .sidebar-toggle > span:not(.sidebar-icon) {
        display: none;
    }

    body.sidebar-collapsed .sidebar-link .sidebar-badge.sidebar-badge-danger {
        position: absolute;
        top: 6px;
        right: 7px;
        display: block;
        width: 9px;
        min-width: 9px;
        height: 9px;
        padding: 0;
        border: 2px solid #020617;
        border-radius: 999px;
        background: #ef4444;
        color: transparent;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, .14);
        font-size: 0;
        line-height: 0;
    }

    body.sidebar-collapsed .sidebar-link,
    body.sidebar-collapsed .sidebar-toggle {
        position: relative;
        grid-template-columns: 42px;
        place-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0;
        transform: none;
    }

    body.sidebar-collapsed .sidebar-icon {
        width: 34px;
        height: 34px;
    }

    body.sidebar-collapsed .sidebar-section > .sidebar-link[data-flyout-label]::after {
        content: attr(data-flyout-label);
        position: absolute;
        top: 50%;
        left: 72px;
        z-index: 1450;
        width: max-content;
        max-width: 220px;
        padding: 8px 10px;
        border: 1px solid rgba(51, 65, 85, .86);
        border-radius: 10px;
        background: rgba(2, 6, 23, .96);
        color: #f8fafc;
        box-shadow: 0 14px 40px rgba(0, 0, 0, .38);
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
        opacity: 0;
        pointer-events: none;
        transform: translate(-4px, -50%);
        transition: opacity .16s ease, transform .16s ease;
    }

    body.sidebar-collapsed .sidebar-section > .sidebar-link[data-flyout-label]:hover::after,
    body.sidebar-collapsed .sidebar-section > .sidebar-link[data-flyout-label]:focus-visible::after {
        opacity: 1;
        transform: translate(0, -50%);
    }

    body.sidebar-collapsed .sidebar-subnav {
        position: fixed;
        z-index: 1400;
        top: var(--sidebar-flyout-top, 120px);
        left: 72px;
        display: none;
        width: min(300px, calc(100vw - 88px));
        max-height: min(560px, calc(100vh - 32px));
        margin: 0;
        padding: 10px;
        overflow-y: auto;
        border: 1px solid rgba(51, 65, 85, .95);
        border-radius: 14px;
        background: rgba(2, 6, 23, .98);
        box-shadow: 0 24px 70px rgba(0, 0, 0, .46);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        -ms-overflow-style: none;
        scrollbar-width: none;
        animation: sidebarFlyoutIn .18s cubic-bezier(.2, .8, .2, 1);
    }

    body.sidebar-collapsed .sidebar-subnav::-webkit-scrollbar {
        display: none;
    }

    body.sidebar-collapsed .sidebar-subnav.is-flyout-open {
        display: grid !important;
    }

    body.sidebar-collapsed .sidebar-subnav::before {
        content: attr(data-flyout-title);
        padding: 2px 8px 8px;
        color: #64748b;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    body.sidebar-collapsed .sidebar-subnav .sidebar-link {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        justify-content: stretch;
        width: 100%;
        min-height: 38px;
        padding: 5px 8px;
    }

    body.sidebar-collapsed .sidebar-subnav .sidebar-link > span:not(.sidebar-icon) {
        display: block;
    }

    body.sidebar-collapsed .sidebar-subnav .sidebar-icon {
        width: 30px;
        height: 30px;
    }

    body.sidebar-collapsed .sidebar-toggle.is-flyout-active {
        border-color: rgba(52, 211, 153, .38);
        background: rgba(16, 185, 129, .13);
        color: #d1fae5;
    }

    body.sidebar-collapsed .sidebar-footer {
        display: grid;
        justify-items: center;
        padding: 10px;
    }

    body.sidebar-collapsed .sidebar-user-menu-wrap {
        display: grid;
        justify-items: center;
        width: 100%;
    }

    body.sidebar-collapsed .sidebar-user-trigger {
        grid-template-columns: 38px;
        place-items: center;
        justify-content: center;
        width: 42px;
        min-height: 42px;
        padding: 2px;
        border-color: transparent;
        background: transparent;
    }

    body.sidebar-collapsed .sidebar-user-trigger:hover,
    body.sidebar-collapsed .sidebar-user-trigger.is-open {
        border-color: rgba(16, 185, 129, .28);
        background: rgba(16, 185, 129, .08);
    }

    body.sidebar-collapsed .sidebar-user-menu {
        left: 72px;
        right: auto;
        bottom: 12px;
        transform-origin: bottom left;
    }

}

@media (max-width: 1023px) {
    .sidebar-user-menu {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: 22px;
        transform: translate(-50%, 12px) scale(.98);
        transform-origin: bottom center;
    }

    .sidebar-user-menu.is-open {
        transform: translate(-50%, 0) scale(1);
    }
}

@keyframes sidebarFlyoutIn {
    from {
        opacity: 0;
        transform: translateX(-6px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Riscos/Oportunidades no padrao operacional de Registros */
doc-workspace, doc-command, doc-command-main, doc-command-actions, doc-metrics,
doc-filter-strip, doc-filter-copy, doc-filter-pills, doc-board, doc-board-head,
doc-board-title, sgq-doc-table, sgq-doc-table-head, sgq-doc-line, sgq-doc-cell,
sgq-doc-identity, sgq-doc-actions, sgq-empty-state, sgq-input-group,
sgq-form-actions, sgq-record, sgq-field, sgq-label, sgq-value, sgq-panel,
record-compose-main, record-compose-side, record-guidance-grid,
record-guidance-card, risk-score-preview, risk-progress {
    display: block;
}

doc-workspace {
    display: grid;
    gap: 14px;
    width: min(100%, 1280px);
    margin-inline: auto;
    color: #17202a;
}

doc-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid #dce6ee;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbfa 55%, #eef7f3 100%);
    box-shadow: 0 16px 36px rgba(31, 45, 61, .07);
}

sgq-eyebrow {
    color: #16745f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

doc-command-main h1 {
    margin: 8px 0 5px;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0;
}

doc-command-main p, doc-board-head p, doc-filter-copy span {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

doc-command-actions {
    display: grid;
    gap: 8px;
}

doc-command:has(doc-command-actions > :nth-child(4)) {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

doc-command:has(doc-command-actions > :nth-child(4)) doc-command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.primary-action, .secondary-action, doc-command-actions button,
doc-board-head .secondary-action, sgq-form-actions button {
    display: inline-grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 6px 12px 6px 7px;
    border: 1px solid #16745f;
    border-radius: 10px;
    background: #16745f;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.secondary-action {
    border-color: #dce6ee;
    background: #fff;
    color: #345247;
}

.compact-action {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    width: auto;
    padding: 5px 10px;
    font-size: 12px;
}

doc-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 9px;
}

doc-metrics sgq-stat, doc-board, sgq-panel, record-guidance-card {
    border: 1px solid #dce6ee;
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 36px rgba(31, 45, 61, .06);
}

doc-metrics sgq-stat {
    min-height: 86px;
    padding: 12px 13px;
}

doc-metrics sgq-stat span, sgq-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

doc-metrics sgq-stat strong {
    display: block;
    font-size: 25px;
    line-height: 1.1;
}

doc-metrics sgq-stat small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

doc-filter-strip {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dce6ee;
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
}

doc-filter-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

doc-filter-pills span {
    padding: 5px 8px;
    border: 1px solid #dbe7e3;
    border-radius: 999px;
    background: #f4faf7;
    color: #345247;
    font-size: 12px;
    font-weight: 750;
}

doc-board {
    padding: 14px;
}

doc-board-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    padding-bottom: 10px;
}

doc-board-head h2, sgq-panel h2 {
    margin: 0 0 3px;
    color: #17202a;
    font-size: 20px;
    font-weight: 880;
}

sgq-doc-table {
    display: grid;
    gap: 6px;
}

.risk-table sgq-doc-table-head,
.risk-table sgq-doc-line {
    display: grid;
    grid-template-columns: 112px minmax(210px, 1.4fr) 92px 120px 68px 76px 68px 128px minmax(120px, .8fr) 132px 72px;
    gap: 10px;
    align-items: center;
}

sgq-doc-table-head {
    padding: 8px 12px 6px;
    border-bottom: 1px solid #edf2f6;
    color: #6a7686;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

sgq-doc-line {
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

sgq-doc-code, .doc-title {
    color: #17202a;
    font-weight: 900;
}

doc-subline {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}

sgq-chip, .risk-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
}

.risk-baixo { background: #e7f6ef; color: #0d6b45; }
.risk-medio { background: #fff4df; color: #8a5400; }
.risk-alto { background: #fff0e6; color: #9a4a00; }
.risk-critico { background: #ffe8e8; color: #a11313; }
.status-identificado, .status-avaliado { background: #eaf2ff; color: #1d4f91; }
.status-em_tratamento, .status-pendente, .status-aberto { background: #fff4df; color: #8a5400; }
.status-monitoramento { background: #e6fbf8; color: #0f766e; }
.status-encerrado, .status-concluida { background: #e7f6ef; color: #0d6b45; }

.risk-matrix-wrap {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e0e8f0;
    border-radius: 14px;
    background: #fbfefd;
}

.risk-matrix-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.risk-matrix {
    display: grid;
    grid-template-columns: repeat(5, minmax(64px, 1fr));
    gap: 6px;
}

.risk-cell {
    display: grid;
    place-items: center;
    min-height: 58px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}

.risk-cell span {
    font-size: 11px;
    font-weight: 800;
}

.risk-cell.is-active {
    outline: 3px solid rgba(22, 116, 95, .24);
    border-color: #16745f;
}

.form-grid, .record-compose-form, .fmea-form, .risk-treatment-form {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr);
    gap: 12px;
}

record-compose-main, record-compose-side {
    display: grid;
    gap: 10px;
}

sgq-input-group {
    display: grid;
    gap: 6px;
}

sgq-input-group span {
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

sgq-input-group input, sgq-input-group select, sgq-input-group textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #dce6ee;
    border-radius: 10px;
    background: #fff;
    color: #17202a;
    padding: 8px 10px;
    outline: none;
}

.span-full, sgq-form-actions {
    grid-column: 1 / -1;
}

sgq-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

risk-score-preview {
    display: grid;
    gap: 3px;
    align-content: center;
    min-height: 94px;
    padding: 12px;
    border-radius: 14px;
}

risk-score-preview span, risk-score-preview small {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

risk-score-preview strong {
    font-size: 28px;
    line-height: 1;
}

record-guidance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

record-guidance-card {
    padding: 13px;
}

record-guidance-card strong, record-guidance-card span {
    display: block;
}

record-guidance-card span {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

sgq-panel {
    padding: 14px;
}

sgq-record {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

sgq-field {
    display: grid;
    gap: 3px;
}

sgq-value {
    color: #17202a;
    font-size: 13px;
    font-weight: 750;
}

.text-block, .risk-note {
    color: #334155;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

risk-progress, .risk-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid #dce6ee;
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
}

risk-progress span, .risk-tabs a {
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

risk-progress .is-done, .risk-tabs a.is-active {
    background: #e7f6ef;
    color: #0d6b45;
}

risk-progress .is-current {
    background: #16745f;
    color: #fff;
}

.risk-treatment-list {
    display: grid;
    gap: 10px;
}

.risk-treatment-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    background: #fff;
}

.risk-treatment-card header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.risk-treatment-form, .fmea-form {
    margin-top: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.risk-timeline {
    display: grid;
    gap: 10px;
}

.risk-timeline article {
    padding: 12px;
    border-left: 3px solid #16745f;
    border-radius: 10px;
    background: #f8fafc;
}

.risk-timeline span, .risk-timeline small, .risk-timeline p {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.fmea-table-wrap {
    overflow-x: auto;
}

.fmea-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: separate;
    border-spacing: 0 6px;
    color: #17202a;
}

.fmea-table th {
    padding: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.fmea-table td {
    padding: 10px 8px;
    border-block: 1px solid #e0e8f0;
    background: #fff;
    font-size: 12px;
}

.fmea-table td:first-child {
    border-left: 1px solid #e0e8f0;
    border-radius: 10px 0 0 10px;
}

.fmea-table td:last-child {
    border-right: 1px solid #e0e8f0;
    border-radius: 0 10px 10px 0;
}

.sgq-modal {
    width: min(720px, calc(100vw - 28px));
    border: 0;
    border-radius: 18px;
    padding: 0;
    color: #17202a;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .36);
}

.sgq-modal::backdrop {
    background: rgba(15, 23, 42, .55);
}

sgq-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e0e8f0;
}

sgq-modal-head h2 {
    margin: 0 0 3px;
    font-size: 20px;
}

.modal-form {
    display: grid;
    gap: 12px;
    padding: 16px;
}

@media (max-width: 1080px) {
    doc-command, .detail-grid, .form-grid, .record-compose-form {
        grid-template-columns: 1fr;
    }
    doc-command:has(doc-command-actions > :nth-child(4)) {
        grid-template-columns: 1fr;
    }
    doc-command:has(doc-command-actions > :nth-child(4)) doc-command-actions {
        grid-template-columns: 1fr;
    }
    doc-metrics, record-guidance-grid, .risk-treatment-form, .fmea-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .risk-table sgq-doc-table-head {
        display: none;
    }
    .risk-table sgq-doc-line {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    doc-metrics, record-guidance-grid, .risk-treatment-form, .fmea-form,
    sgq-record, .risk-table sgq-doc-line {
        grid-template-columns: 1fr;
    }
    doc-filter-strip, doc-board-head, .risk-treatment-card header {
        align-items: stretch;
        flex-direction: column;
    }
    .risk-matrix {
        grid-template-columns: repeat(5, minmax(44px, 1fr));
    }
}

@media print {
    body {
        background: #fff !important;
        color: #111827 !important;
    }
    .sidebar-shell, doc-command-actions, .risk-tabs, .risk-matrix-wrap, button {
        display: none !important;
    }
    doc-command, doc-board, sgq-panel, doc-metrics sgq-stat {
        box-shadow: none !important;
        background: #fff !important;
    }
}

/* Controle de mudancas */
.change-module {
    --change-bg: #f6faf8;
    --change-panel: #ffffff;
    --change-border: #dce6ee;
    --change-text: #17202a;
    --change-muted: #64748b;
    --change-accent: #16745f;
    display: grid;
    gap: 14px;
    color: var(--change-text);
}

.change-command,
.change-board,
.change-filter-strip,
.change-pipeline,
.change-panel,
.change-guidance article {
    border: 1px solid var(--change-border);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 16px 36px rgba(31, 45, 61, .07);
}

.change-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff 0%, #f7fbfa 55%, #eef7f3 100%);
}

.change-eyebrow {
    margin: 0;
    color: var(--change-accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.change-command h1 {
    margin: 8px 0 5px;
    color: #111827;
    font-size: 30px;
    font-weight: 900;
}

.change-command span,
.change-board-head p,
.change-filter-strip span,
.change-guidance span,
.change-text-block span,
.change-panel p {
    color: var(--change-muted);
}

.change-actions {
    display: grid;
    gap: 8px;
}

.change-primary,
.change-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}

.change-primary {
    border: 1px solid var(--change-accent);
    background: var(--change-accent);
    color: #fff;
    box-shadow: 0 10px 20px rgba(22, 116, 95, .16);
}

.change-secondary {
    border: 1px solid #d8e3eb;
    background: #fff;
    color: #345247;
}

.change-primary:hover,
.change-secondary:hover {
    transform: translateY(-1px);
    border-color: #115345;
    background: #115345;
    color: #fff;
}

.change-primary svg,
.change-secondary svg {
    width: 16px;
    height: 16px;
}

.change-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 9px;
}

.change-metrics article {
    min-height: 86px;
    padding: 12px 13px;
    border: 1px solid #e1e8ef;
    border-radius: 14px;
    background: #fff;
}

.change-metrics article:first-child {
    border-color: #b9dcd2;
    background: linear-gradient(135deg, #fff, #eff9f5);
}

.change-metrics span,
.change-pipeline-step span {
    display: block;
    color: #536475;
    font-size: 12px;
    font-weight: 800;
}

.change-metrics strong,
.change-pipeline-step strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 25px;
    line-height: 1;
}

.change-metrics small {
    color: var(--change-muted);
    font-size: 11px;
    font-weight: 700;
}

.change-pipeline {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
}

.change-pipeline-step {
    min-height: 72px;
    padding: 12px;
    border: 1px solid #dbe7e3;
    border-radius: 12px;
    background: #f9fdfb;
    text-decoration: none;
}

.change-pipeline-step.is-muted {
    background: #f5f7fa;
}

.change-filter-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 14px;
}

.change-pills {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.change-pills span {
    padding: 5px 8px;
    border: 1px solid #dbe7e3;
    border-radius: 999px;
    background: #f4faf7;
    color: #345247;
    font-size: 12px;
    font-weight: 750;
}

.change-board {
    padding: 14px;
    border-radius: 16px;
}

.change-board-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    padding-bottom: 10px;
}

.change-board-head h2,
.change-panel h2 {
    margin: 0 0 3px;
    color: #111827;
    font-size: 20px;
    font-weight: 880;
}

.change-secondary.compact {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 12px;
}

.change-table {
    display: grid;
    gap: 6px;
}

.change-table-head,
.change-table-row {
    display: grid;
    grid-template-columns: minmax(230px, 1.55fr) minmax(92px, .55fr) minmax(110px, .7fr) minmax(120px, .75fr) minmax(112px, .7fr) minmax(118px, .7fr) minmax(118px, .7fr) 122px 68px;
    gap: 10px;
    align-items: center;
}

.change-table-head {
    padding: 8px 12px 6px;
    border-bottom: 1px solid #edf2f6;
    color: #6a7686;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.change-table-row {
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.change-table-row:hover {
    border-color: #b8cbd8;
    background: #fbfefd;
    box-shadow: 0 13px 26px rgba(31, 45, 61, .07);
    transform: translateY(-1px);
}

.change-table-row > span {
    color: #344456;
    font-size: 13px;
}

.change-identity {
    display: grid;
    gap: 2px;
}

.change-identity strong {
    color: var(--change-accent);
    font-size: 12px;
    font-weight: 900;
}

.change-identity a {
    color: #111827;
    font-size: 14px;
    font-weight: 880;
    text-decoration: none;
}

.change-identity small {
    color: var(--change-muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.change-row-actions {
    display: flex;
    justify-content: end;
}

.change-chip {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    font-style: normal;
}

.change-chip.status-solicitada,
.change-chip.status-em_analise,
.change-chip.status-equipe_avaliacao,
.change-chip.status-analise_risco,
.change-chip.status-plano_acao,
.change-chip.status-aguardando_aprovacao {
    background: #fff4df;
    color: #8a5400;
}

.change-chip.status-aprovada,
.change-chip.status-em_implementacao,
.change-chip.status-implementada,
.change-chip.status-avaliacao_eficacia,
.change-chip.status-encerrada {
    background: #e7f6ef;
    color: #0d6b45;
}

.change-chip.status-reprovada {
    background: #ffe9eb;
    color: #9f1239;
}

.change-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 34px 16px;
    border: 1px dashed #cad7e2;
    border-radius: 14px;
    background: #fbfefd;
    color: var(--change-muted);
    text-align: center;
}

.change-empty strong {
    color: #17202a;
}

.change-form,
.change-modal-form {
    display: grid;
    gap: 14px;
}

.change-form {
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
    align-items: start;
}

.change-form-main,
.change-form-side {
    display: grid;
    gap: 12px;
}

.change-form label,
.change-modal-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

.change-form input,
.change-form select,
.change-form textarea,
.change-modal-form input,
.change-modal-form select,
.change-modal-form textarea {
    width: 100%;
    border: 1px solid #d8e3eb;
    border-radius: 11px;
    background: #fff;
    color: #17202a;
    padding: 10px 11px;
    outline: 0;
}

.change-form input:focus,
.change-form select:focus,
.change-form textarea:focus,
.change-modal-form input:focus,
.change-modal-form select:focus,
.change-modal-form textarea:focus {
    border-color: #79bbaa;
    box-shadow: 0 0 0 3px rgba(22, 116, 95, .1);
}

.change-check {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #d8e3eb;
    border-radius: 11px;
    background: #f9fbfc;
}

.change-check input {
    width: 16px;
    height: 16px;
    padding: 0;
}

.change-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    grid-column: 1 / -1;
}

.change-guidance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.change-guidance article {
    display: grid;
    gap: 6px;
    padding: 13px;
    border-radius: 14px;
}

.change-guidance strong {
    color: #17202a;
}

.change-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.change-panel {
    padding: 16px;
    border-radius: 16px;
}

.change-panel dl,
.change-plan {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.change-panel dt,
.change-plan dt {
    color: var(--change-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.change-panel dd,
.change-plan dd {
    margin: 3px 0 0;
    color: #17202a;
    font-weight: 780;
}

.change-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 10px 0 12px;
}

.change-progress span {
    padding: 8px;
    border: 1px solid #d8e3eb;
    border-radius: 10px;
    background: #f5f7fa;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.change-progress span.is-done {
    border-color: #b9dcd2;
    background: #e7f6ef;
    color: #0d6b45;
}

.change-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.change-tabs a {
    padding: 8px 11px;
    border: 1px solid #d8e3eb;
    border-radius: 999px;
    background: #fff;
    color: #536475;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.change-tabs a.is-active {
    border-color: var(--change-accent);
    background: #e7f6ef;
    color: var(--change-accent);
}

.change-text-block,
.change-history {
    display: grid;
    gap: 9px;
}

.change-text-block {
    padding: 12px;
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    background: #fff;
    white-space: pre-wrap;
}

.change-text-block strong {
    color: #17202a;
}

.change-history article {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    background: #fff;
}

.change-history article strong {
    color: #17202a;
}

.change-history article span,
.change-history article small {
    color: var(--change-muted);
}

.change-modal {
    width: min(560px, calc(100vw - 28px));
    border: 1px solid #d8e3eb;
    border-radius: 16px;
    background: #fff;
    color: #17202a;
    padding: 16px;
    box-shadow: 0 24px 70px rgba(31, 45, 61, .22);
}

.change-modal::backdrop {
    background: rgba(20, 30, 42, .42);
    backdrop-filter: blur(4px);
}

.change-modal header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: start;
    margin-bottom: 14px;
}

.change-modal h2 {
    margin: 0 0 3px;
    color: #111827;
}

.change-modal p {
    margin: 0;
    color: var(--change-muted);
}

.change-modal header button {
    border: 1px solid #d8e3eb;
    border-radius: 10px;
    background: #fff;
    color: #345247;
    padding: 7px 10px;
    font-weight: 850;
}

@media (max-width: 1180px) {
    .change-metrics,
    .change-pipeline {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .change-table-head {
        display: none;
    }

    .change-table-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .change-identity,
    .change-row-actions {
        grid-column: 1 / -1;
    }

    .change-table-row > span:not(.change-row-actions)::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--change-muted);
        font-size: 10px;
        font-weight: 900;
        text-transform: uppercase;
    }
}

@media (max-width: 760px) {
    .change-command,
    .change-form,
    .change-detail-grid {
        grid-template-columns: 1fr;
    }

    .change-metrics,
    .change-pipeline,
    .change-guidance,
    .change-panel dl,
    .change-plan,
    .change-progress,
    .change-table-row {
        grid-template-columns: 1fr;
    }

    .change-filter-strip,
    .change-board-head,
    .change-modal header {
        align-items: stretch;
        flex-direction: column;
    }

    .change-command h1 {
        font-size: 24px;
    }
}

/* Tema escuro operacional para CAPA, riscos, mudancas, fornecedores e clientes */
:root {
    color-scheme: dark;
    --bg: #050b0d;
    --surface: rgba(13, 20, 23, .86);
    --surface-soft: rgba(15, 23, 42, .72);
    --ink: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, .16);
    --accent: #10b981;
    --accent-2: #5eead4;
    --shadow: 0 22px 52px rgba(0, 0, 0, .34);
}

/* Padrao de distribuicao das acoes nos headers das paginas modernas. */
.modern-page-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    align-items: stretch;
    min-width: 220px;
}

.modern-page-actions.is-two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: min(440px, 100%);
}

.modern-page-actions > .primary-action,
.modern-page-actions > .secondary-action,
.modern-page-actions > button,
.modern-page-actions > a {
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 7px 13px !important;
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .modern-page-actions,
    .modern-page-actions.is-two-columns {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
    }
}

body {
    color: var(--ink);
}

doc-workspace {
    width: min(100%, 1280px);
    margin-inline: auto;
    color: var(--ink);
}

doc-command,
.page-title,
.document-hero,
.detail-hero {
    border-color: var(--line);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(13, 20, 23, .76)),
        radial-gradient(circle at 84% 18%, rgba(16, 185, 129, .12), transparent 36%);
    box-shadow: var(--shadow);
}

doc-board,
sgq-panel,
doc-metrics sgq-stat,
doc-filter-strip,
record-guidance-card,
template-guidance-card,
document-guidance-card,
.metric,
sgq-stat,
sgq-auth-box,
sgq-record,
sgq-row,
sgq-doc-line,
.documents-table sgq-doc-line,
.record-template-card,
revision-workflow-step,
revision-control-card,
sgq-revision-card,
sgq-attachment-row,
sgq-empty-state,
.text-block,
.risk-note,
.risk-matrix-wrap,
.risk-treatment-card,
.risk-timeline article,
.fmea-table td,
.actions a,
.timeline-item,
.capa-timeline-item {
    border-color: var(--line) !important;
    background: rgba(15, 23, 42, .72) !important;
    color: var(--ink);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

doc-metrics sgq-stat:first-child,
.metrics .metric:first-child,
.document-summary sgq-stat:first-child {
    border-color: rgba(16, 185, 129, .34);
    background:
        linear-gradient(135deg, rgba(16, 185, 129, .16), rgba(15, 23, 42, .78)) !important;
}

doc-command-main h1,
doc-board-head h2,
sgq-panel h2,
sgq-doc-code,
.doc-title,
sgq-value,
sgq-empty-state strong,
record-guidance-card strong,
template-guidance-card strong,
document-guidance-card strong,
.detail-section-head h2,
.document-list-head h2,
.record-template-card h3,
revision-control-card strong,
revision-workflow-step strong,
.text-block strong,
.risk-treatment-card strong,
.risk-timeline strong,
.fmea-table,
.timeline-item strong,
.capa-timeline-item strong {
    color: var(--ink) !important;
}

doc-command-main p,
doc-board-head p,
doc-filter-copy span,
doc-filter-strip span,
doc-subline,
sgq-doc-cell,
sgq-label,
record-guidance-card span,
template-guidance-card span,
document-guidance-card span,
sgq-cell,
.muted,
.page-title p,
.detail-hero p,
.detail-section-head p,
.document-list-head p,
.text-block,
.risk-note,
.risk-timeline span,
.risk-timeline small,
.risk-timeline p,
.timeline-item p,
.capa-timeline-item p {
    color: var(--muted) !important;
}

sgq-eyebrow,
sgq-doc-code,
.change-eyebrow {
    border-color: rgba(16, 185, 129, .28);
    background: rgba(16, 185, 129, .1);
    color: #86efac;
}

sgq-doc-table-head,
.documents-table sgq-doc-table-head,
.fmea-table th {
    border-color: rgba(148, 163, 184, .14);
    color: #94a3b8;
}

sgq-doc-line:hover,
.documents-table sgq-doc-line:hover,
sgq-row:hover,
.record-template-card:hover,
.actions a:hover {
    border-color: rgba(16, 185, 129, .34) !important;
    background: rgba(21, 32, 43, .82) !important;
    box-shadow: 0 20px 46px rgba(0, 0, 0, .3);
}

input,
select,
textarea,
sgq-input-group input,
sgq-input-group select,
sgq-input-group textarea,
input[type="file"] {
    border-color: rgba(148, 163, 184, .22);
    background: rgba(2, 6, 23, .72);
    color: var(--ink);
}

input::placeholder,
textarea::placeholder {
    color: #64748b;
}

input:focus,
select:focus,
textarea:focus,
sgq-input-group input:focus,
sgq-input-group select:focus,
sgq-input-group textarea:focus {
    border-color: rgba(16, 185, 129, .62);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}

sgq-input-group span,
.inline-check {
    color: #cbd5e1;
}

.secondary-action,
doc-command-actions .secondary-action,
doc-board-head .secondary-action,
sgq-doc-actions .secondary-action,
.detail-action-stack .secondary-action,
.compact-action {
    border-color: rgba(148, 163, 184, .24);
    background: rgba(15, 23, 42, .7);
    color: #d1fae5;
}

.secondary-action:hover,
doc-command-actions .secondary-action:hover,
doc-board-head .secondary-action:hover,
sgq-doc-actions .secondary-action:hover,
.detail-action-stack .secondary-action:hover,
.compact-action:hover {
    border-color: rgba(16, 185, 129, .55);
    background: rgba(16, 185, 129, .16);
    color: #ecfdf5;
}

.secondary-action .button-icon,
.detail-action-stack .button-icon {
    background: rgba(16, 185, 129, .16);
    color: #86efac;
}

doc-filter-pills span,
sgq-chip,
.risk-chip,
risk-progress span,
.risk-tabs a,
.capa-tabs a,
.tab-strip a {
    border-color: rgba(148, 163, 184, .2) !important;
    background: rgba(30, 41, 59, .78) !important;
    color: #cbd5e1 !important;
}

risk-progress .is-done,
.risk-tabs a.is-active,
.capa-tabs a.is-active,
.tab-strip a:hover {
    border-color: rgba(16, 185, 129, .48) !important;
    background: rgba(16, 185, 129, .16) !important;
    color: #86efac !important;
}

risk-progress .is-current {
    border-color: var(--accent) !important;
    background: var(--accent) !important;
    color: #04130f !important;
}

.sgq-modal,
.change-modal,
.document-row-menu {
    border: 1px solid var(--line);
    background: #0f172a;
    color: var(--ink);
    box-shadow: 0 34px 90px rgba(0, 0, 0, .55);
}

.sgq-modal::backdrop,
.change-modal::backdrop {
    background: rgba(2, 6, 23, .7);
    backdrop-filter: blur(6px);
}

sgq-modal-head,
.change-modal header {
    border-color: var(--line);
}

sgq-modal-head h2,
.change-modal h2 {
    color: var(--ink);
}

sgq-modal-head p,
.change-modal p {
    color: var(--muted);
}

sgq-modal-head button,
.change-modal header button,
.document-row-menu a,
.document-row-menu button,
.icon-only {
    border-color: rgba(148, 163, 184, .24);
    background: rgba(15, 23, 42, .72);
    color: #cbd5e1;
}

sgq-modal-head button:hover,
.change-modal header button:hover,
.document-row-menu a:hover,
.document-row-menu button:hover,
.icon-only:hover {
    border-color: rgba(16, 185, 129, .46);
    background: rgba(16, 185, 129, .14);
    color: #d1fae5;
}

.risk-baixo { background: rgba(16, 185, 129, .16) !important; color: #86efac !important; }
.risk-medio { background: rgba(245, 158, 11, .16) !important; color: #fcd34d !important; }
.risk-alto { background: rgba(249, 115, 22, .18) !important; color: #fdba74 !important; }
.risk-critico { background: rgba(239, 68, 68, .18) !important; color: #fca5a5 !important; }
.status-identificado,
.status-avaliado { background: rgba(59, 130, 246, .18) !important; color: #93c5fd !important; }
.status-em_tratamento,
.status-pendente,
.status-aberto,
.status-solicitada,
.status-em_analise { background: rgba(245, 158, 11, .16) !important; color: #fcd34d !important; }
.status-monitoramento,
.status-encerrado,
.status-concluida,
.status-aprovado,
.status-aprovada,
.status-implementada,
.status-encerrada { background: rgba(16, 185, 129, .16) !important; color: #86efac !important; }
.status-reprovado,
.status-reprovada { background: rgba(244, 63, 94, .18) !important; color: #fda4af !important; }

.change-module {
    --change-bg: #050b0d;
    --change-panel: rgba(15, 23, 42, .72);
    --change-border: rgba(148, 163, 184, .16);
    --change-text: #f8fafc;
    --change-muted: #94a3b8;
    --change-accent: #10b981;
    color: var(--change-text);
}

.change-command,
.change-board,
.change-filter-strip,
.change-pipeline,
.change-panel,
.change-guidance article,
.change-metrics article,
.change-pipeline-step,
.change-empty,
.change-text-block,
.change-history article,
.change-table-row {
    border-color: var(--change-border);
    background: var(--change-panel);
    color: var(--change-text);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

.change-command {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(13, 20, 23, .76)),
        radial-gradient(circle at 84% 18%, rgba(16, 185, 129, .12), transparent 36%);
}

.change-command h1,
.change-board-head h2,
.change-panel h2,
.change-metrics strong,
.change-pipeline-step strong,
.change-identity a,
.change-empty strong,
.change-guidance strong,
.change-panel dd,
.change-plan dd,
.change-text-block strong,
.change-history article strong {
    color: var(--change-text);
}

.change-secondary,
.change-modal header button {
    border-color: rgba(148, 163, 184, .24);
    background: rgba(15, 23, 42, .72);
    color: #d1fae5;
}

.change-secondary:hover {
    border-color: rgba(16, 185, 129, .55);
    background: rgba(16, 185, 129, .16);
    color: #ecfdf5;
}

.change-modal {
    width: min(94vw, 720px);
    max-height: 90vh;
    overflow: hidden;
    padding: 0;
    border-radius: 16px;
}

.change-modal header {
    margin: 0;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.change-modal header button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
}

.change-modal-form {
    max-height: calc(90vh - 105px);
    overflow-y: auto;
    padding: 20px 24px 24px;
}

.change-modal .change-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, .16);
}

/* Controles de mudancas sem icone usam o mesmo corpo dos botoes do sistema,
   sem a coluna de icone reservada pelo componente principal. */
[data-mudanca-tab-panel] .primary-action,
[data-mudanca-tab-panel] .secondary-action,
.change-modal .change-primary,
.change-modal .change-secondary,
.change-row-actions .change-secondary,
.change-empty .change-primary {
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 38px;
    padding: 6px 12px;
    gap: 8px;
    white-space: nowrap;
    text-align: center;
}

.change-table-head {
    border-color: rgba(148, 163, 184, .14);
    color: #94a3b8;
}

.change-table-row:hover {
    border-color: rgba(16, 185, 129, .34);
    background: rgba(21, 32, 43, .82);
}

.change-table-row > span,
.change-form label,
.change-modal-form label,
.change-panel dt,
.change-plan dt,
.change-history article span,
.change-history article small {
    color: var(--change-muted);
}

.change-form input,
.change-form select,
.change-form textarea,
.change-modal-form input,
.change-modal-form select,
.change-modal-form textarea,
.change-check {
    border-color: rgba(148, 163, 184, .22);
    background: rgba(2, 6, 23, .72);
    color: var(--change-text);
}

.change-pills span,
.change-chip,
.change-progress span,
.change-tabs a {
    border-color: rgba(148, 163, 184, .2);
    background: rgba(30, 41, 59, .78);
    color: #cbd5e1;
}

.change-tabs a.is-active,
.change-progress span.is-done {
    border-color: rgba(16, 185, 129, .48);
    background: rgba(16, 185, 129, .16);
    color: #86efac;
}

/* Compatibilidade: cabecalhos legados com o mesmo padrao de /clientes/ */
.module-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(13, 20, 23, .76)),
        radial-gradient(circle at 84% 18%, rgba(16, 185, 129, .12), transparent 36%);
    box-shadow: var(--shadow);
}

.module-command > div:first-child {
    min-width: 0;
}

.module-command > div:first-child p:first-child {
    width: fit-content;
    padding: 5px 8px;
    border: 1px solid rgba(16, 185, 129, .28);
    border-radius: 999px;
    background: rgba(16, 185, 129, .1);
    color: #86efac !important;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.module-command > div:first-child h1 {
    margin: 8px 0 5px;
    color: var(--ink) !important;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0;
}

.module-command > div:first-child p:not(:first-child) {
    max-width: 760px;
    margin: 0;
    color: var(--muted) !important;
    font-size: 14px;
    line-height: 1.45;
}

.module-command-actions,
.change-actions {
    display: grid;
    gap: 8px;
}

/* Mantem no maximo tres acoes por coluna, como nos cabecalhos doc-command. */
.module-command:has(.module-command-actions > :nth-child(4)) {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

.module-command:has(.module-command-actions > :nth-child(4)) .module-command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.module-command-actions form,
.doc-command-actions form,
doc-command-actions form,
.change-actions form {
    margin: 0;
    width: 100%;
}

.module-command-actions .primary-action,
.module-command-actions .secondary-action,
.module-command-actions button,
.doc-command-actions .primary-action,
.doc-command-actions .secondary-action,
.doc-command-actions button,
doc-command-actions .primary-action,
doc-command-actions .secondary-action,
doc-command-actions button,
.change-actions .primary-action,
.change-actions .secondary-action,
.change-actions button,
.change-primary,
.change-secondary,
.btn-modulo-principal,
.btn-modulo-secundario {
    display: inline-grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    min-height: 38px;
    height: auto;
    padding: 6px 12px 6px 7px;
    border: 1px solid #16745f;
    border-radius: 10px;
    background: #16745f;
    color: #fff;
    font-size: 13px;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(22, 116, 95, .16);
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}

.module-command-actions .secondary-action,
.doc-command-actions .secondary-action,
doc-command-actions .secondary-action,
.change-actions .secondary-action,
.change-secondary,
.btn-modulo-secundario {
    border-color: rgba(148, 163, 184, .24);
    background: rgba(15, 23, 42, .7);
    color: #d1fae5;
    box-shadow: none;
}

.module-command-actions .primary-action:hover,
.module-command-actions .secondary-action:hover,
.module-command-actions button:hover,
.doc-command-actions .primary-action:hover,
.doc-command-actions .secondary-action:hover,
.doc-command-actions button:hover,
doc-command-actions .primary-action:hover,
doc-command-actions .secondary-action:hover,
doc-command-actions button:hover,
.change-actions .primary-action:hover,
.change-actions .secondary-action:hover,
.change-actions button:hover,
.change-primary:hover,
.change-secondary:hover,
.btn-modulo-principal:hover,
.btn-modulo-secundario:hover {
    transform: translateY(-1px);
    border-color: #115345;
    background: #115345;
    color: #fff;
    box-shadow: 0 14px 26px rgba(22, 116, 95, .22);
}

.btn-modulo-principal::before,
.btn-modulo-secundario::before {
    content: "";
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .17);
}

.btn-modulo-secundario::before {
    background: rgba(16, 185, 129, .16);
}

@media (max-width: 1080px) {
    .module-command {
        grid-template-columns: 1fr;
    }

    .module-command:has(.module-command-actions > :nth-child(4)) .module-command-actions {
        grid-template-columns: 1fr;
    }
}

doc-command:not(:has(doc-command-actions)) {
    grid-template-columns: 1fr;
}

/* Menu suspenso compartilhado para botoes de acao em tabelas/listas. */
.action-menu-wrap,
.document-action-menu-wrap {
    position: static;
}

.action-menu-trigger,
.document-action-menu-trigger {
    display: grid;
    width: 36px;
    height: 36px;
    min-height: 36px;
    place-items: center;
    border: 1px solid rgb(51 65 85);
    border-radius: 12px;
    background: rgb(2 6 23);
    color: rgb(203 213 225);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.action-menu-trigger:hover,
.action-menu-trigger[aria-expanded="true"],
.document-action-menu-trigger:hover,
.document-action-menu-trigger[aria-expanded="true"] {
    border-color: rgba(16, 185, 129, .5);
    background: rgba(16, 185, 129, .12);
    color: #d1fae5;
}

.action-menu,
.document-action-menu {
    position: fixed;
    z-index: 1600;
    display: none;
    width: max-content;
    min-width: 210px;
    max-width: min(280px, calc(100vw - 24px));
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 14px;
    background: rgba(2, 6, 23, .98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .56);
}

.action-menu.is-open,
.document-action-menu.is-open {
    display: grid;
}

.action-menu button,
.action-menu a,
.document-action-menu button,
.document-action-menu a {
    display: block;
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #e2e8f0;
    padding: 9px 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.action-menu button:hover,
.action-menu a:hover,
.document-action-menu button:hover,
.document-action-menu a:hover {
    background: rgba(16, 185, 129, .13);
    color: #d1fae5;
}

.action-menu .is-danger,
.document-action-menu .is-danger {
    color: #fecdd3;
}

.action-menu .is-danger:hover,
.document-action-menu .is-danger:hover {
    background: rgba(244, 63, 94, .14);
    color: #ffe4e6;
}

.action-menu form,
.document-action-menu form {
    margin: 0;
}
