:root {
    --secma-topbar-height: 72px;
    --secma-footer-height: 54px;
    --secma-sidebar-width: 320px;
    --secma-sidebar-collapsed-width: 0px;
    --secma-blue-strong: #124b76;
    --secma-blue-deep: #124b76;
    --secma-sidebar-bg: #05070b;
    --secma-footer-bg: #124b76;
    --secma-page-bg: #e9eef6;
    --secma-surface: #ffffff;
    --secma-text: #172033;
    --secma-muted: #6b7280;
    --secma-border: rgba(15, 23, 42, 0.08);
    --secma-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Barlow', sans-serif;
    background: radial-gradient(circle at top left, rgba(11, 69, 212, 0.18), transparent 25%), var(--secma-page-bg);
    color: var(--secma-text);
}

body.sidebar-open {
    overflow: hidden;
}

.secma-topbar {
    height: var(--secma-topbar-height);
    background: linear-gradient(90deg, var(--secma-blue-deep), var(--secma-blue-strong));
    box-shadow: 0 10px 30px rgba(7, 47, 152, 0.28);
    z-index: 1045;
}

.secma-topbar .navbar,
.secma-topbar .container-fluid {
    height: 100%;
}

.secma-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: #fff;
    text-decoration: none;
}

.secma-brand:hover {
    color: #fff;
}

.secma-brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.3rem;
    font-weight: 700;
}

.secma-brand strong,
.secma-brand small {
    display: block;
    line-height: 1.1;
}

.secma-brand small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
}

.secma-menu-toggle,
.secma-topbar-action {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.secma-menu-toggle:hover,
.secma-topbar-action:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.secma-status-pill {
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.9rem;
}

.secma-sidebar {
    position: fixed;
    top: var(--secma-topbar-height);
    left: 0;
    bottom: var(--secma-footer-height);
    width: var(--secma-sidebar-width);
    background: linear-gradient(180deg, #111317 0%, var(--secma-sidebar-bg) 100%);
    color: #fff;
    z-index: 1040;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.24);
    transition: transform 0.3s ease;
}

.secma-sidebar-inner {
    height: 100%;
    overflow-y: auto;
    padding: 1.5rem 1.25rem 1.5rem;
}

.secma-sidebar-header {
    padding: 0.5rem 0.35rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
}

.secma-sidebar-header h2 {
    font-size: 1.15rem;
    margin: 0;
}

.secma-sidebar-header span,
.secma-sidebar-eyebrow {
    display: block;
    color: rgba(255, 255, 255, 0.66);
}

.secma-sidebar-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    margin-bottom: 0.4rem;
}

.secma-nav {
    gap: 0.18rem;
}

.secma-nav .nav-link,
.secma-dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.68rem 0.82rem;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 500;
}

.secma-nav .nav-link {
    justify-content: flex-start;
}

.secma-nav .nav-link:hover,
.secma-dropdown-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.secma-nav .nav-link.active,
.secma-dropdown-toggle.active {
    color: #fff;
    background: #124b76;
}

.secma-nav .nav-link i,
.secma-dropdown-toggle i:first-child {
    width: 1.2rem;
}

.secma-dropdown-toggle .bi-chevron-down {
    transition: transform 0.2s ease;
}

.secma-dropdown-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.secma-submenu {
    margin: 0.22rem 0 0.3rem;
    padding-left: 1rem;
}

.secma-submenu li + li {
    margin-top: 0.2rem;
}

.secma-submenu a {
    display: block;
    padding: 0.58rem 0.78rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.secma-submenu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.secma-submenu a.active {
    color: #fff;
    background: #124b76;
}

.secma-sidebar-card {
    margin-top: 1.4rem;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(11, 69, 212, 0.28), rgba(11, 69, 212, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.secma-sidebar-card p,
.secma-sidebar-card span {
    color: rgba(255, 255, 255, 0.74);
}

.secma-sidebar-backdrop {
    position: fixed;
    inset: var(--secma-topbar-height) 0 var(--secma-footer-height) 0;
    background: rgba(2, 6, 23, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 1035;
}

.secma-main {
    min-height: 100vh;
    padding: calc(var(--secma-topbar-height) + 1.5rem) 1.5rem calc(var(--secma-footer-height) + 1.5rem) calc(var(--secma-sidebar-width) + 1.5rem);
    transition: padding-left 0.3s ease;
}

/* =============================================
   Card reusable para modulos
   ============================================= */
.secma-module-card {
    border: 1px solid var(--secma-border);
    border-radius: 18px;
    background: var(--secma-surface);
    box-shadow: var(--secma-shadow);
    overflow: hidden;
}

.secma-module-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(90deg, #124b76 0%, #8f99a8 100%);
}

.secma-module-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 600;
    padding: 0.42rem 0.85rem;
    text-decoration: none;
}

.secma-module-add-btn:hover,
.secma-module-add-btn:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.26);
}

.secma-module-add-btn i {
    font-size: 1.05rem;
    line-height: 1;
}


.secma-module-breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    justify-content: flex-end;
    font-size: 1.08rem;
}

.secma-module-breadcrumb .breadcrumb-item {
    color: #222;
}
.secma-module-breadcrumb .breadcrumb-item a {
    color: #ffc107;
    text-decoration: none;
}

.secma-module-breadcrumb .breadcrumb-item.active {
    color: #222;
}

.secma-module-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.72);
}

.secma-module-card-body {
    background: #ffffff;
    padding: 1rem;
}

.secma-page-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border-radius: 28px;
    background: linear-gradient(135deg, #153baf 0%, #2b67ff 100%);
    color: #fff;
    box-shadow: var(--secma-shadow);
}

.secma-page-kicker {
    margin: 0 0 0.45rem;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.secma-page-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.secma-page-copy {
    margin: 0.65rem 0 0;
    max-width: 60ch;
    color: rgba(255, 255, 255, 0.82);
}

.secma-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.secma-stat-card,
.secma-content-card {
    height: 100%;
    border-radius: 24px;
    padding: 1.35rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: var(--secma-shadow);
    backdrop-filter: blur(12px);
}

.secma-stat-card strong {
    display: block;
    margin: 1rem 0 0.25rem;
    font-size: 2rem;
}

.secma-stat-card p {
    margin: 0;
    color: var(--secma-muted);
}

.secma-stat-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(11, 69, 212, 0.1);
    color: var(--secma-blue-strong);
    font-size: 1.25rem;
}

.secma-card-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.secma-card-heading p {
    margin: 0 0 0.2rem;
    color: var(--secma-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
}

.secma-card-heading h2 {
    margin: 0;
    font-size: 1.3rem;
}

.secma-demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.secma-demo-grid > div {
    padding: 1rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--secma-border);
}

.secma-demo-grid h3 {
    font-size: 1rem;
    margin-bottom: 0.45rem;
}

.secma-demo-grid p,
.secma-checklist li {
    color: var(--secma-muted);
    margin: 0;
}

.secma-checklist li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--secma-border);
}

.secma-checklist li:last-child {
    border-bottom: 0;
}

.secma-checklist i {
    color: var(--secma-blue-strong);
}

.secma-footer {
    height: var(--secma-footer-height);
    display: flex;
    align-items: center;
    background: var(--secma-footer-bg);
    color: #f8fafc;
    z-index: 1030;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.14);
}

@media (max-width: 1199.98px) {
    .secma-page-hero {
        flex-direction: column;
        align-items: start;
    }

    .secma-demo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .secma-sidebar {
        transform: translateX(-100%);
        bottom: 0;
    }

    .secma-sidebar-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .secma-shell.sidebar-visible .secma-sidebar {
        transform: translateX(0);
    }

    .secma-main {
        padding-right: 1rem;
        padding-left: 1rem;
        padding-top: calc(var(--secma-topbar-height) + 1rem);
        padding-bottom: calc(var(--secma-footer-height) + 1rem);
    }
}

@media (min-width: 992px) {
    .secma-shell.sidebar-collapsed .secma-sidebar {
        transform: translateX(-100%);
    }

    .secma-shell.sidebar-collapsed .secma-main {
        padding-left: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .secma-brand strong {
        font-size: 0.95rem;
    }

    .secma-main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .secma-page-hero,
    .secma-stat-card,
    .secma-content-card {
        border-radius: 20px;
    }

    .secma-module-card {
        border-radius: 14px;
    }

    .secma-module-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .secma-module-breadcrumb {
        justify-content: flex-start;
    }
}
