/*
 * Kreative TMS panel shell
 * Visual direction: dark operational sidebar with high-contrast active state.
 */
:root {
    --kr-shell-sidebar: #11131c;
    --kr-shell-sidebar-2: #171923;
    --kr-shell-sidebar-border: #282b3a;
    --kr-shell-sidebar-muted: #8d93a7;
    --kr-shell-sidebar-text: #e9edf7;
    --kr-shell-active: #f59e0b;
    --kr-shell-active-hover: #fbbf24;
    --kr-shell-blue: #151b2e;
    --kr-shell-content: #f4f6fa;
    --kr-shell-content-dark: #0d111a;
}

body {
    background: var(--kr-shell-content);
}

.dark body {
    background: var(--kr-shell-content-dark);
}

.fi-sidebar.fi-main-sidebar {
    background:
        linear-gradient(180deg, rgba(28, 33, 51, .98), rgba(17, 19, 28, .98)),
        var(--kr-shell-sidebar) !important;
    border-right: 1px solid var(--kr-shell-sidebar-border) !important;
    box-shadow: 16px 0 36px rgba(2, 6, 23, .22);
}

.fi-sidebar-header-ctn,
.fi-sidebar-header {
    background: #10121b !important;
    border-color: var(--kr-shell-sidebar-border) !important;
}

.fi-sidebar-header {
    min-height: 4.25rem;
}

.fi-sidebar-header-logo-ctn,
.fi-logo,
.fi-logo a {
    color: #172033 !important;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fi-sidebar .fi-logo,
.fi-sidebar .fi-logo a,
.dark .fi-logo,
.dark .fi-logo a {
    color: #ffffff !important;
}

.fi-sidebar-header-logo-ctn {
    align-items: center !important;
    display: flex !important;
    min-width: 0;
}

.fi-logo {
    color: #172033 !important;
    display: block !important;
    font-size: 1.05rem !important;
    line-height: 1 !important;
    max-width: 11.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-sidebar .fi-logo,
.dark .fi-logo {
    color: #ffffff !important;
}

.fi-logo::first-letter {
    color: var(--kr-shell-active);
}

.fi-sidebar-nav {
    scrollbar-color: #b99032 transparent;
}

.fi-sidebar-nav::-webkit-scrollbar {
    width: 7px;
}

.fi-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.fi-sidebar-nav::-webkit-scrollbar-thumb {
    background: #b99032;
    border-radius: 999px;
}

.fi-sidebar-nav-groups {
    gap: .55rem !important;
    padding: .9rem 0 max(1rem, calc(100dvh - 4rem)) !important;
}

.fi-sidebar-group {
    margin: 0 !important;
}

/* Evidencia o modulo atual sem alterar a rolagem natural do menu lateral. */
.fi-sidebar-group.kr-active-navigation-group > .fi-sidebar-group-btn {
    background: #242a46 !important;
    border-color: rgba(245, 158, 11, .55) !important;
    color: #ffffff !important;
}

.fi-sidebar-group.kr-active-navigation-group > .fi-sidebar-group-btn svg {
    color: var(--kr-shell-active) !important;
}

.fi-sidebar-group-btn {
    background: rgba(91, 99, 145, .16) !important;
    border: 1px solid rgba(129, 140, 248, .11) !important;
    color: #c6cce0 !important;
    border-radius: 8px !important;
    min-height: 2.5rem;
    margin: .22rem .75rem !important;
    padding: .45rem .75rem !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.fi-sidebar-group.fi-active > .fi-sidebar-group-btn,
.fi-sidebar-group-btn:hover {
    background: rgba(91, 99, 145, .28) !important;
    border-color: rgba(129, 140, 248, .24) !important;
    color: #ffffff !important;
}

.fi-sidebar-group-btn svg,
.fi-sidebar-group-dropdown-trigger-btn svg,
.fi-sidebar-item-icon {
    color: #697089 !important;
}

.fi-sidebar-group.fi-active > .fi-sidebar-group-btn svg {
    color: var(--kr-shell-active) !important;
}

.fi-sidebar-group-btn:hover svg {
    color: #ffffff !important;
}

.fi-sidebar-group-label {
    color: inherit !important;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.fi-sidebar-group-collapse-btn {
    color: #6d748c !important;
}

.fi-sidebar-group-items {
    gap: .18rem !important;
    padding: .2rem 0 .25rem !important;
}

.fi-sidebar-item-grouped-border,
.fi-sidebar-item-grouped-border-part,
.fi-sidebar-item-grouped-border-part-not-first,
.fi-sidebar-item-grouped-border-part-not-last {
    display: none !important;
}

.fi-sidebar-item-btn {
    border-radius: 8px !important;
    color: var(--kr-shell-sidebar-muted) !important;
    min-height: 2.65rem;
    margin: .08rem .72rem !important;
    padding: .55rem 1.05rem .55rem 1.75rem !important;
    position: relative;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.fi-sidebar-item-btn::before {
    background: currentColor;
    border-radius: 999px;
    content: "";
    height: .25rem;
    left: .82rem;
    opacity: .45;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: .25rem;
}

.fi-sidebar-item-btn::after {
    display: none;
}

.fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, .045) !important;
    color: #ffffff !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-sidebar-item-has-active-child-items > .fi-sidebar-item-btn {
    background: var(--kr-shell-active) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 26px rgba(233, 19, 63, .24);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn:hover {
    background: var(--kr-shell-active-hover) !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::before,
.fi-sidebar-item-has-active-child-items > .fi-sidebar-item-btn::before {
    background: #ffffff;
    opacity: .9;
}

.fi-sidebar-item-label {
    color: inherit !important;
    font-size: .88rem;
    font-weight: 700;
}

.fi-sidebar-item-badge-ctn .fi-badge {
    background: rgba(255, 255, 255, .12) !important;
    color: #ffffff !important;
}

.fi-sidebar-open-collapse-sidebar-btn,
.fi-sidebar-close-collapse-sidebar-btn {
    color: #8188a2 !important;
}

.fi-sidebar-open-collapse-sidebar-btn:hover,
.fi-sidebar-close-collapse-sidebar-btn:hover {
    background: rgba(255, 255, 255, .08) !important;
    color: #ffffff !important;
}

.fi-topbar {
    background: rgba(255, 255, 255, .88) !important;
    border-bottom: 1px solid rgba(148, 163, 184, .24) !important;
    backdrop-filter: blur(14px);
}

.dark .fi-topbar {
    background: rgba(15, 23, 42, .84) !important;
    border-bottom-color: rgba(51, 65, 85, .7) !important;
}

.kr-topbar-torre {
    align-items: center;
    display: flex;
    gap: .35rem;
    margin-left: clamp(3rem, 5vw, 5.5rem);
    min-width: 0;
    padding-left: 1rem;
    position: relative;
}

.kr-topbar-torre::before {
    background: rgba(148, 163, 184, .28);
    content: "";
    height: 1.9rem;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
}

.kr-topbar-torre-label {
    color: #64748b;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    margin-right: .25rem;
    text-transform: uppercase;
}

.dark .kr-topbar-torre-label {
    color: #94a3b8;
}

.kr-topbar-torre-link {
    align-items: center;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    color: #475569 !important;
    display: inline-flex;
    font-size: .82rem;
    font-weight: 800;
    height: 2.15rem;
    padding: 0 .8rem;
    text-decoration: none !important;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
    white-space: nowrap;
}

.kr-topbar-torre-link:hover {
    background: rgba(15, 23, 42, .06);
    border-color: rgba(15, 23, 42, .15);
    color: #0f172a !important;
}

.kr-topbar-torre-link-active {
    background: var(--kr-shell-active) !important;
    border-color: var(--kr-shell-active) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.kr-topbar-torre-dropdown {
    display: inline-flex;
    position: relative;
}

.kr-topbar-torre-dropdown::after {
    content: "";
    height: .65rem;
    left: 0;
    position: absolute;
    right: 0;
    top: 100%;
}

.kr-topbar-torre-menu {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
    display: none;
    gap: .25rem;
    left: 0;
    min-width: 13.5rem;
    padding: .35rem;
    position: absolute;
    top: calc(100% + .45rem);
    z-index: 80;
}

.kr-topbar-torre-dropdown:hover .kr-topbar-torre-menu,
.kr-topbar-torre-dropdown:focus-within .kr-topbar-torre-menu {
    display: grid;
}

.kr-topbar-torre-sub-link {
    border-radius: 7px;
    color: #475569 !important;
    font-size: .8rem;
    font-weight: 850;
    padding: .55rem .65rem;
    text-decoration: none !important;
    white-space: nowrap;
}

.kr-topbar-torre-sub-link:hover {
    background: #f1f5f9;
    color: #0f172a !important;
}

.kr-topbar-torre-sub-link-active {
    background: rgba(245, 158, 11, .14);
    color: #92400e !important;
}

.dark .kr-topbar-torre-link {
    background: rgba(30, 41, 59, .65);
    border-color: rgba(100, 116, 139, .28);
    color: #cbd5e1 !important;
}

.dark .kr-topbar-torre-link:hover {
    background: rgba(51, 65, 85, .82);
    color: #ffffff !important;
}

.dark .kr-topbar-torre-link-active {
    background: var(--kr-shell-active) !important;
    border-color: var(--kr-shell-active) !important;
    color: #ffffff !important;
}

.dark .kr-topbar-torre-menu {
    background: #0f172a;
    border-color: rgba(100, 116, 139, .36);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .34);
}

.dark .kr-topbar-torre-sub-link {
    color: #cbd5e1 !important;
}

.dark .kr-topbar-torre-sub-link:hover {
    background: rgba(51, 65, 85, .78);
    color: #ffffff !important;
}

.dark .kr-topbar-torre-sub-link-active {
    background: rgba(245, 158, 11, .22);
    color: #fbbf24 !important;
}

.kr-topbar-user-context {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: .05rem;
    line-height: 1.1;
    margin-inline: .55rem .35rem;
    max-width: min(28vw, 19rem);
    min-width: 0;
    text-align: right;
}

.kr-topbar-user-context span {
    color: #94a3b8;
    font-size: .66rem;
    font-weight: 800;
}

.kr-topbar-user-context strong {
    color: #1e293b;
    display: block;
    font-size: .78rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.kr-topbar-user-context i {
    color: var(--kr-shell-active);
    font-style: normal;
    margin-inline: .25rem;
}

.kr-topbar-app-code {
    align-items: center;
    background: rgba(245, 158, 11, .13);
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 999px;
    color: #92400e;
    display: inline-flex;
    font-size: .64rem;
    font-style: normal;
    font-weight: 900;
    gap: .25rem;
    line-height: 1;
    margin-top: .1rem;
    padding: .18rem .45rem;
    white-space: nowrap;
}

.kr-topbar-app-code b {
    color: #78350f;
    font-weight: 950;
}

.dark .kr-topbar-user-context span {
    color: #94a3b8;
}

.dark .kr-topbar-user-context strong {
    color: #e2e8f0;
}

.dark .kr-topbar-app-code {
    background: rgba(245, 158, 11, .16);
    border-color: rgba(245, 158, 11, .34);
    color: #fbbf24;
}

.dark .kr-topbar-app-code b {
    color: #fde68a;
}

.fi-main {
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, .08), transparent 28rem),
        var(--kr-shell-content) !important;
}

.dark .fi-main {
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, .08), transparent 28rem),
        var(--kr-shell-content-dark) !important;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn {
    border-radius: 10px !important;
    justify-content: center;
    margin: .1rem .55rem !important;
    padding: .65rem !important;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn::before {
    display: none;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn::after {
    display: none;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group-dropdown-trigger-btn {
    border-radius: 10px !important;
    color: #aeb5c9 !important;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group-dropdown-trigger-btn:hover,
.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group.fi-active .fi-sidebar-group-dropdown-trigger-btn {
    background: var(--kr-shell-active) !important;
    color: #ffffff !important;
}

@media (max-width: 1024px) {
    .fi-sidebar.fi-main-sidebar {
        box-shadow: 18px 0 44px rgba(2, 6, 23, .36);
    }

    .kr-topbar-torre {
        display: none;
    }

    .kr-topbar-user-context {
        display: none;
    }
}

.kr-dashboard-stat {
    --kr-stat-accent: var(--kr-shell-active);
    --kr-stat-accent-soft: rgba(245, 158, 11, .18);
    border-radius: 8px !important;
    overflow: hidden;
    position: relative;
}

.kr-dashboard-stat::before {
    background: linear-gradient(180deg, var(--kr-stat-accent), var(--kr-stat-accent-soft));
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    width: 4px;
}

.kr-stat-blue {
    --kr-stat-accent: #3b82f6;
    --kr-stat-accent-soft: rgba(59, 130, 246, .18);
}

.kr-stat-green {
    --kr-stat-accent: #22c55e;
    --kr-stat-accent-soft: rgba(34, 197, 94, .18);
}

.kr-stat-yellow {
    --kr-stat-accent: #f59e0b;
    --kr-stat-accent-soft: rgba(245, 158, 11, .2);
}

.kr-stat-gray {
    --kr-stat-accent: #64748b;
    --kr-stat-accent-soft: rgba(100, 116, 139, .18);
}

.kr-dashboard-stat .kr-stat-main {
    font-size: 2.05rem;
    font-weight: 900;
    letter-spacing: 0;
}

.kr-dashboard-stat .kr-stat-divider {
    color: #94a3b8;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 .42rem;
}

.kr-dashboard-stat .kr-stat-secondary {
    color: #64748b;
    font-size: 1.45rem;
    font-weight: 800;
}

.dark .kr-dashboard-stat .kr-stat-secondary {
    color: #cbd5e1;
}

.kr-stat-progress {
    background: #e5e7eb;
    display: block;
    height: 5px;
    margin-top: 1.05rem;
    overflow: hidden;
    width: 100%;
}

.dark .kr-stat-progress {
    background: rgba(148, 163, 184, .22);
}

.kr-stat-progress-fill {
    background: var(--kr-stat-accent);
    display: block;
    height: 100%;
}

.kr-stat-progress-label {
    align-items: center;
    color: #94a3b8;
    display: flex;
    font-size: .8rem;
    justify-content: space-between;
    margin-top: .45rem;
}

.kr-stat-progress-label strong {
    color: #64748b;
    font-weight: 800;
}

.dark .kr-stat-progress-label strong {
    color: #e2e8f0;
}

/* Auth / login */
.fi-simple-layout {
    background:
        linear-gradient(90deg, rgba(10, 15, 29, .82), rgba(10, 15, 29, .48) 34%, rgba(245, 158, 11, .12)),
        var(--kr-login-bg-url, url("/images/auth/login-bg.jpg")) center / cover no-repeat fixed !important;
    align-items: center !important;
    display: flex !important;
    justify-content: flex-start !important;
    min-height: 100vh;
    padding-left: clamp(2rem, 7vw, 7rem);
    padding-right: 2rem;
    position: relative;
}

.fi-simple-layout .fi-simple-main-ctn {
    align-items: center !important;
    display: flex !important;
    justify-content: flex-start !important;
    width: 100% !important;
}

.fi-simple-layout::before {
    background:
        radial-gradient(circle at 18% 18%, rgba(245, 158, 11, .28), transparent 26rem),
        radial-gradient(circle at 82% 72%, rgba(14, 165, 233, .16), transparent 24rem);
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
}

.fi-simple-main {
    position: relative;
    z-index: 1;
}

.fi-simple-main .fi-logo {
    color: #ffffff !important;
    font-size: 1.55rem !important;
    max-width: none;
    text-shadow: 0 12px 32px rgba(0, 0, 0, .36);
}

.fi-simple-main .fi-simple-page {
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, .88) !important;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(2, 6, 23, .38);
    overflow: hidden;
}

.dark .fi-simple-main .fi-simple-page {
    background: rgba(15, 23, 42, .86) !important;
    border-color: rgba(148, 163, 184, .2);
}

.fi-simple-layout .fi-simple-main {
    display: contents !important;
    width: min(39rem, calc(100vw - 2rem));
}

.fi-simple-layout .fi-simple-main .fi-simple-page {
    background: rgba(255, 255, 255, .96) !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 26px 70px rgba(2, 6, 23, .32) !important;
    overflow: visible !important;
    padding: 2.45rem 3rem !important;
}

.fi-simple-layout .fi-simple-main form,
.fi-simple-layout .fi-simple-main section {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.fi-simple-layout .fi-simple-main .fi-simple-header {
    margin-bottom: 1.35rem !important;
}

.fi-simple-layout .fi-simple-main .fi-logo {
    color: #111827 !important;
    display: block !important;
    font-size: 1.35rem !important;
    margin: 0 auto 1.35rem !important;
    text-align: center;
    text-shadow: none;
}

.fi-simple-layout .fi-simple-main .fi-logo::first-letter {
    color: var(--kr-shell-active);
}

.fi-simple-layout .fi-simple-main h1,
.fi-simple-layout .fi-simple-main .fi-simple-header-heading {
    color: #111827 !important;
    font-size: 1.35rem !important;
    font-weight: 900 !important;
    margin-bottom: 1.35rem !important;
    text-align: center;
}

.fi-simple-layout .fi-simple-main label {
    color: #111827 !important;
    font-weight: 700 !important;
}

.fi-simple-layout .fi-simple-main .fi-input-wrp {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06) !important;
    overflow: hidden;
}

.fi-simple-layout .fi-simple-main .fi-input-wrp:focus-within {
    border-color: var(--kr-shell-active) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .16) !important;
}

.fi-simple-layout .fi-simple-main input {
    color: #0f172a !important;
}

.fi-simple-layout .fi-simple-main .fi-fo-field-wrp-helper-text,
.fi-simple-layout .fi-simple-main .fi-checkbox-list-option-label {
    color: #475569 !important;
}

.fi-simple-layout .fi-simple-main .fi-btn {
    border-radius: 10px !important;
    font-weight: 800 !important;
}

.dark .fi-simple-layout .fi-simple-main .fi-simple-page {
    background: rgba(15, 23, 42, .92) !important;
    border-color: rgba(148, 163, 184, .22);
}

.dark .fi-simple-layout .fi-simple-main form,
.dark .fi-simple-layout .fi-simple-main section {
    background: transparent !important;
    border-color: transparent;
}

.dark .fi-simple-layout .fi-simple-main .fi-logo,
.dark .fi-simple-layout .fi-simple-main h1,
.dark .fi-simple-layout .fi-simple-main .fi-simple-header-heading,
.dark .fi-simple-layout .fi-simple-main label {
    color: #f8fafc !important;
}

.dark .fi-simple-layout .fi-simple-main .fi-input-wrp {
    background: rgba(15, 23, 42, .9) !important;
    border-color: rgba(148, 163, 184, .32) !important;
}

.dark .fi-simple-layout .fi-simple-main input {
    color: #f8fafc !important;
}

@media (max-width: 768px) {
    .fi-simple-layout {
        justify-content: center !important;
        padding-inline: 1rem;
    }

    .fi-simple-layout .fi-simple-main-ctn {
        justify-content: center !important;
    }
}
