:root {
    --tag-navy: #002333;
    --tag-teal: #159a9c;
    --tag-mint: #deefe7;
    --tag-white: #ffffff;
    --tag-muted: #9bb5b6;
}

/* Brand lockup */
.tag-cms-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    height: 100%;
    color: var(--tag-navy);
    line-height: 1;
}

.tag-cms-brand-mark {
    width: 2rem;
    height: 2.2rem;
    object-fit: contain;
}

.tag-cms-brand-copy {
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    column-gap: 0.28rem;
    row-gap: 0;
    white-space: nowrap;
    font-size: 0.74rem;
    letter-spacing: 0.01em;
}

.tag-cms-brand-copy strong {
    grid-column: 1 / 3;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.tag-cms-brand-copy small {
    margin-left: 0.25rem;
    color: var(--tag-teal);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

/* Sidebar */
.fi-sidebar {
    background: var(--tag-navy);
    border-right-color: rgba(255, 255, 255, 0.08);
}

.fi-sidebar-header {
    background: var(--tag-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fi-sidebar .tag-cms-brand {
    color: var(--tag-white);
}

.fi-sidebar .tag-cms-brand-mark {
    filter: brightness(0) invert(1);
}

.fi-sidebar .fi-sidebar-group-label {
    color: var(--tag-muted);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fi-sidebar .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item-icon {
    color: rgba(255, 255, 255, 0.78);
}

.fi-sidebar .fi-sidebar-item-button:hover {
    background: rgba(222, 239, 231, 0.09);
}

.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    background: rgba(21, 154, 156, 0.2);
    box-shadow: inset 3px 0 0 var(--tag-teal);
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: var(--tag-white);
}

/* Top bar */
.fi-topbar {
    border-bottom-color: rgba(0, 35, 51, 0.09);
}

.fi-topbar .tag-cms-brand {
    color: var(--tag-navy);
}

/* Page headings */
.fi-header-heading {
    color: var(--tag-navy);
    letter-spacing: -0.025em;
}

/* Cards and sections */
.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat {
    border-color: rgba(0, 35, 51, 0.1);
}

.fi-section-header-heading {
    color: var(--tag-navy);
}

/* Tabs and selected states */
.fi-tabs-item[aria-selected="true"],
.fi-tabs-item.fi-active {
    color: var(--tag-teal);
}

/* Login screen */
.fi-simple-layout {
    background:
        radial-gradient(
            circle at top right,
            rgba(21, 154, 156, 0.24),
            transparent 34rem
        ),
        var(--tag-navy);
}

.fi-simple-main-ctn {
    position: relative;
}

.fi-simple-main {
    border: 1px solid rgba(222, 239, 231, 0.35);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

.fi-simple-header .tag-cms-brand {
    color: var(--tag-white);
    transform: scale(1.08);
}

.fi-simple-header .tag-cms-brand-mark {
    filter: brightness(0) invert(1);
}

/* Operational accents */
.fi-btn.fi-color-primary {
    font-weight: 700;
}

::selection {
    background: rgba(21, 154, 156, 0.3);
}
/* TAG CMS theme logic fix — 2026-07-31 */
.fi-sidebar,
.fi-sidebar-header {
    background: #002333 !important;
}

html:not(.dark) .fi-main-ctn {
    background: #f4f8f7 !important;
}

html:not(.dark) .fi-topbar {
    background: #ffffff !important;
    border-bottom-color: #d7e4e1 !important;
}

html:not(.dark) .fi-header-heading,
html:not(.dark) .fi-section-header-heading {
    color: #002333 !important;
}

html:not(.dark) .fi-section,
html:not(.dark) .fi-ta-ctn,
html:not(.dark) .fi-wi-stats-overview-stat {
    background: #ffffff !important;
    border-color: #d7e4e1 !important;
}

html.dark .fi-main-ctn {
    background: #071319 !important;
}

html.dark .fi-topbar {
    background: #001923 !important;
    border-bottom-color: #223b47 !important;
}

html.dark .fi-topbar .tag-cms-brand {
    color: #ffffff !important;
}

html.dark .fi-header-heading,
html.dark .fi-section-header-heading {
    color: #edf7f5 !important;
}

html.dark .fi-section,
html.dark .fi-ta-ctn,
html.dark .fi-wi-stats-overview-stat {
    background: #0d1d25 !important;
    border-color: #223b47 !important;
}

html.dark .fi-body,
html.dark .fi-main {
    color: #edf7f5 !important;
}

.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-button {
    background: rgba(21, 154, 156, 0.22) !important;
    box-shadow: inset 3px 0 0 #159a9c;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #ffffff !important;
}

.fi-simple-layout {
    background:
        radial-gradient(circle at 85% 5%, rgba(21, 154, 156, 0.24), transparent 32rem),
        linear-gradient(145deg, #001923, #002333) !important;
}

html:not(.dark) .fi-simple-main {
    background: #ffffff !important;
    border-color: rgba(222, 239, 231, 0.75) !important;
}

html.dark .fi-simple-main {
    background: #0d1d25 !important;
    border-color: #223b47 !important;
}

.fi-simple-header .tag-cms-brand {
    color: #ffffff !important;
}

.fi-simple-header .tag-cms-brand-mark,
.fi-sidebar .tag-cms-brand-mark {
    filter: none !important;
    background: transparent !important;
}

.fi-tabs-item[aria-selected="true"],
.fi-tabs-item.fi-active {
    color: #159a9c !important;
}
