/* Brand Identity */
:root {
    --brand-primary: #042630;    /* Legacy: --color-primary */
    --brand-secondary: #1a3d47;  /* Legacy: --color-secondary */
    --brand-accent: #3a656a;     /* Legacy: --color-accent */
    --brand-highlight: #86b9b0;  /* Legacy: --color-highlight */
    --brand-bg: #e5ebeb;         /* Legacy: --color-light (body bg) */
    --brand-light: #e5ebeb;      /* Legacy: --color-light */
    --card-bg: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: rgba(0,0,0,0.175);
}

[data-bs-theme="dark"] {
    --brand-primary: #0d1b21;    /* Darker Teal */
    --brand-secondary: #1a3d47;  /* Keep same or slightly adjusted */
    --brand-accent: #4a7d82;     /* Lighter accent for dark mode */
    --brand-highlight: #5f8f8f;  /* Muted highlight */
    /* --brand-bg: #121212; REMOVED to allow inline override */
    --brand-light: #2c3035;      /* Dark card bg */
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: rgba(255,255,255,0.1);
}

body {
    background: var(--brand-bg);
    min-height: 100vh;
    color: var(--text-main);
}

/* Bootstrap Overrides */
.bg-primary {
    background-color: var(--brand-primary) !important;
}

.text-primary {
    color: var(--brand-primary) !important;
}

[data-bs-theme="dark"] .text-primary {
    color: #86b9b0 !important; /* Lighter teal for readability in dark mode */
}

/* Button Consistency */
.btn {
    font-weight: 600;
    border-radius: 0.375rem; /* Matches toggle-pill-container */
    padding: 0.375rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--brand-accent) !important;
    border-color: var(--brand-accent) !important;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-outline-primary {
    color: var(--brand-secondary);
    border-color: var(--brand-secondary);
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #86b9b0;
    border-color: #86b9b0;
}

.btn-outline-primary:hover {
    background-color: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #86b9b0;
    border-color: #86b9b0;
    color: #121212;
}

.btn-link {
    color: var(--brand-secondary);
    text-decoration: none;
}

[data-bs-theme="dark"] .btn-link {
    color: #86b9b0;
}

.btn-link:hover {
    color: var(--brand-accent);
    text-decoration: underline;
}

[data-bs-theme="dark"] .btn-link:hover {
    color: #a8d5ce;
}

/* Legacy Card Style */
.card-legacy {
    border: 1px solid var(--brand-highlight) !important;
    border-radius: 1rem !important; /* 16px */
    box-shadow: 0 3px 10px rgba(0,0,0,0.24) !important;
    overflow: hidden;
    background-color: var(--card-bg);
}

[data-bs-theme="dark"] .card-legacy {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5) !important;
}

[data-bs-theme="dark"] .portfolio-total-section {
    background: linear-gradient(135deg, #2c3035 0%, #1e1e1e 100%);
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .portfolio-stat-card {
    background-color: #2c3035;
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .portfolio-stat-title,
[data-bs-theme="dark"] .dashboard-stat-label {
    color: #a0a0a0;
}

[data-bs-theme="dark"] .portfolio-total-value,
[data-bs-theme="dark"] .portfolio-stat-value,
[data-bs-theme="dark"] .dashboard-stat-value {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #2c3035 !important;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .text-muted {
    color: #a0a0a0 !important;
}

.card-legacy .card-header {
    background-color: var(--brand-primary) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-align: center;
    padding: 0.75rem 1rem;
    position: relative;
}

.card-legacy .card-title {
    color: inherit !important;
    margin-bottom: 0;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 2px;
}

/* Component Utilities */
.last-no-border:last-child {
    border-right: 0 !important;
}

[data-bs-theme="dark"] .text-gray-800 {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #1e1e1e !important;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .table {
    color: #e0e0e0;
    border-color: var(--border-color);
}

[data-bs-theme="dark"] .list-group-item {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-main);
}


/* Typography Consistency */
.dashboard-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--brand-secondary);
}

.dashboard-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1.2;
}

.dashboard-stat-subtext {
    font-size: 0.7rem;
    color: #adb5bd;
}

.dashboard-stat-icon {
    font-size: 1.25rem;
    color: var(--brand-secondary);
    opacity: 0.8;
}

.dashboard-detail-text {
    font-size: 0.75rem;
    color: #212529;
}

/* Accordion Tweaks */
.accordion-button::after {
    display: none;
}

/* Placeholders */
.dashed-placeholder {
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6 !important;
    border-radius: 1rem !important;
}

/* Letter Spacing Utility */
.letter-spacing-1 {
    letter-spacing: 1px;
}

/* Portfolio Overview Styles */
.portfolio-total-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

.portfolio-total-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
}

.portfolio-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.portfolio-stat-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.portfolio-stat-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.25rem;
}

.portfolio-stat-icon {
    font-size: 1.25rem;
    color: var(--brand-secondary);
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.portfolio-stat-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--brand-secondary);
}

.portfolio-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1.2;
}

/* Custom Toggle Switch Color */
.form-check-input:checked {
    background-color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
}

/* Table/List Utilities */
.table-row-sm {
    height: 35px;
}

.w-40px {
    width: 40px;
}

.w-250px {
    width: 250px;
}

.icon-sm {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.cursor-pointer {
    cursor: pointer;
}

/* Timeline Analysis */
.timeline-year-row {
    height: 45px;
    font-weight: 700;
    background-color: #f8f9fa;
    cursor: pointer;
}

.timeline-month-row {
    height: 40px;
    background-color: #eef2f3; /* bg-drilldown-level-1 */
    cursor: pointer;
}

.timeline-platform-row {
    height: 35px;
    background-color: #ffffff; /* bg-drilldown-level-2 */
}

/* Text Colors */
.text-brand-primary {
    color: var(--brand-primary) !important;
}

.text-brand-secondary {
    color: var(--brand-secondary) !important;
}

.text-brand-accent {
    color: var(--brand-accent) !important;
}

.text-brand-danger {
    color: #dc3545 !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

/* Backgrounds */
.bg-brand-primary {
    background-color: var(--brand-primary) !important;
}

.bg-brand-secondary {
    background-color: var(--brand-secondary) !important;
}

.bg-brand-accent {
    background-color: var(--brand-accent) !important;
}

.bg-brand-highlight {
    background-color: var(--brand-highlight) !important;
}

.bg-brand-secondary-light {
    background-color: #f8f9fa;
}

.bg-drilldown-level-1 {
    background-color: #eef2f3;
}

.bg-drilldown-level-2 {
    background-color: #ffffff;
}

/* Transitions */
.transition-transform {
    transition: transform 0.2s ease;
}

.rotate-90 {
    transform: rotate(90deg);
}

/* Progress Bars */
.progress-xs {
    height: 6px;
    border-radius: 3px;
    background-color: #e9ecef;
}

.progress-xxs {
    height: 4px;
    border-radius: 2px;
    background-color: #e9ecef;
}

.portfolio-stat-secondary {
    font-size: 0.7rem;
    color: #adb5bd;
}

/* Custom Toggle Switch */
.toggle-pill-container {
    background-color: #f1f3f5;
    border-radius: 0.375rem; /* 6px */
    padding: 0.2rem;
    display: inline-flex;
    margin-bottom: 0.5rem;
}

.toggle-pill-item {
    padding: 0.15rem 0.6rem;
    border-radius: 0.25rem; /* 4px */
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
}

.toggle-pill-item.active {
    background-color: var(--brand-secondary);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-pill-item:hover:not(.active) {
    color: var(--brand-primary);
    background-color: rgba(0,0,0,0.05);
}

/* Legacy Modal Styling */
.modal-legacy .modal-content {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-legacy .modal-header {
    background-color: var(--brand-secondary);
    color: white;
    border-bottom: 2px solid var(--brand-accent);
    padding: 0.75rem 1.25rem;
}

.modal-legacy .modal-title {
    font-size: 1rem;
    font-weight: 600;
}

.modal-legacy .btn-close {
    opacity: 0.8;
}

.modal-legacy .modal-body {
    font-size: 0.85rem; /* Smaller text as requested */
    background-color: #f8f9fa;
}

.modal-legacy .list-group-item {
    padding: 0.75rem 1rem;
    border-color: #e9ecef;
    background-color: white;
    margin-bottom: 2px;
    border-radius: 4px !important;
    border: 1px solid #e9ecef !important;
}

.modal-legacy .badge {
    font-weight: 500;
}

/* Table Utilities for Reports */
.table-header-brand {
    background-color: var(--brand-secondary) !important;
    color: white !important;
}

.timeline-icon {
    font-size: 0.8rem;
    color: #6c757d;
}

.timeline-platform-icon {
    width: 16px; 
    height: 16px;
}

.timeline-percent-label {
    min-width: 45px; 
    text-align: right;
}

/* Pagination Override (Matches Toggle Style) */
.pagination {
    --bs-pagination-active-bg: var(--brand-secondary);
    --bs-pagination-active-border-color: var(--brand-secondary);
    --bs-pagination-color: #6c757d;
    --bs-pagination-hover-color: var(--brand-primary);
    --bs-pagination-focus-color: var(--brand-primary);
    --bs-pagination-focus-bg: rgba(0,0,0,0.05);
    --bs-pagination-focus-box-shadow: none;
    justify-content: center;
    margin-bottom: 0;
}

.page-link {
    border: 1px solid #dee2e6;
    margin: 0 2px;
    border-radius: 0.25rem !important; /* Match toggle-pill-item radius */
    color: #6c757d;
}

.page-item.active .page-link {
    background-color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-link:hover {
    color: var(--brand-primary);
    background-color: rgba(0,0,0,0.05);
    border-color: #dee2e6;
}

.page-link:focus {
    box-shadow: none;
    color: var(--brand-primary);
    background-color: rgba(0,0,0,0.05);
}

.page-item.disabled .page-link {
    color: #adb5bd;
    background-color: #fff;
    border-color: #dee2e6;
}

.bg-expanded-year {
    background-color: #dbe4e6 !important;
}

.bg-expanded-month {
    background-color: #dbe4e6 !important;
}

.fs-085 {
    font-size: 0.85rem;
}

.fs-08 {
    font-size: 0.8rem;
}

.text-color-444 {
    color: #444;
}

/* --- New Navbar Styles (Round 5 Implementation) --- */

/* Chart Utilities */
.chart-container {
    position: relative;
    height: 350px;
    min-height: 350px;
    width: 100%;
}

/* Navbar Container */
.navbar-custom {

    background-color: var(--brand-primary) !important; /* #042630 */
    padding: 0.5rem 1rem; /* Standard Bootstrap padding to preserve height */
}

/* Nav Links - Pill Style & Typography */
.nav-link-pill {
    border-radius: 50px;
    padding: 8px 20px !important;
    margin: 0 2px;
    transition: all 0.2s ease;
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none;
    display: inline-block;
    
    /* Typography: Light & Wide */
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.nav-link-pill:hover, 
.nav-link-pill.show, 
.nav-link-pill.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

/* Submenu Style (Deep Brand Primary - dm-3) */
.dropdown-menu-dark-teal {
    background-color: var(--brand-primary);
    border: 1px solid var(--brand-secondary);
    padding: 0;
    min-width: 250px;
    margin-top: 10px; /* Offset */
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu-dark-teal .dropdown-header {
    color: var(--brand-highlight); 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.7rem; 
    letter-spacing: 1px; 
    padding: 0.75rem 1.25rem 0.25rem; 
}

.dropdown-menu-dark-teal .dropdown-item {
    color: rgba(255, 255, 255, 0.8); 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    padding: 0.6rem 1.25rem; 
    letter-spacing: 0.5px; 
    transition: all 0.2s; 
}

.dropdown-menu-dark-teal .dropdown-item:hover {
    background-color: var(--brand-secondary); 
    color: #fff; 
    padding-left: 1.5rem; /* Slide effect */
}

.dropdown-menu-dark-teal .dropdown-divider {
    border-top: 1px solid var(--brand-secondary); 
    margin: 0.25rem 0; 
    opacity: 0.5; 
}

/* Dark Toggle Container (for Navbar) */
.toggle-pill-dark {
    background-color: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 4px;
    display: inline-flex;
}

.toggle-pill-item-dark {
    padding: 4px 12px;
    border-radius: 50px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.toggle-pill-item-dark:hover {
    color: white;
}

.toggle-pill-item-dark.active {
    background-color: white;
    color: var(--brand-primary);
}

/* Production/Demo Button (Outline White) */
.btn-production-outline {
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s;
}

.btn-production-outline:hover {
    border-color: white;
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.btn-demo-warning {
    background-color: #ffc107;
    color: #000;
    border: 1px solid #ffc107;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
}

/* --- Menu Layout Alternatives Implementation --- */

/* 1. Left Sidebar Layout */
body.layout-sidebar {
    display: flex;
    min-height: 100vh;
    flex-direction: row;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.layout-sidebar > .sidebar-layout-container {
    display: flex;
    width: 100%;
}

body.layout-sidebar .app-sidebar {
    width: 260px;
    background-color: var(--brand-primary);
    color: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    z-index: 1020;
}

body.layout-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.layout-sidebar .sidebar-menu {
    list-style: none;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
}

body.layout-sidebar .sidebar-header {
    font-size: 0.65rem;
    color: var(--brand-highlight);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
    display: block;
}

body.layout-sidebar .sidebar-item-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.85);
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    
    /* Typography style matching Classic nav links */
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 2px;
    
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

body.layout-sidebar .sidebar-item-btn:hover,
body.layout-sidebar .sidebar-item-btn.active {
    background-color: rgba(255,255,255,0.08);
    color: #ffffff;
}

body.layout-sidebar .sidebar-item-btn-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.layout-sidebar .sidebar-item-btn-inner i {
    width: 16px;
    text-align: center;
    opacity: 0.75;
}

body.layout-sidebar .sidebar-sub-menu {
    list-style: none;
    padding-left: 2.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.2rem;
    margin-bottom: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin-bottom 0.3s ease;
}

body.layout-sidebar .sidebar-group.open .sidebar-sub-menu {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 0.5rem;
}

body.layout-sidebar .sidebar-group.open .accordion-icon {
    transform: rotate(180deg);
}

body.layout-sidebar .sidebar-sub-link {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    
    /* Typography style matching Classic */
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 1px;
    
    padding: 0.4rem 0.5rem;
    display: block;
    border-radius: 4px;
    transition: all 0.2s;
}

body.layout-sidebar .sidebar-sub-link:hover,
body.layout-sidebar .sidebar-sub-link.active {
    color: #ffffff;
    background-color: rgba(255,255,255,0.04);
    padding-left: 0.75rem;
}

body.layout-sidebar .sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

body.layout-sidebar .app-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

/* Sidebar context aware background gradient positioning */
body.layout-sidebar.gradient-enabled .app-content-wrapper {
    position: relative;
}

body.layout-sidebar.gradient-enabled .huge-gradient-bg {
    left: 0;
    width: 100%;
}

/* Sidebar layout main content container padding adjustment */
body.layout-sidebar .container.pb-5 {
    padding-top: 1.5rem !important;
}

/* 2. Grid Mega Menu Layout */
.layout-mega .dropdown-mega:hover .dropdown-menu-mega {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.layout-mega .dropdown-menu-mega {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0.2s;
    
    position: absolute;
    left: 1.5rem !important;
    right: 1.5rem !important;
    width: auto !important;
    min-width: 320px;
    background-color: var(--brand-primary);
    border: 1px solid var(--brand-secondary);
    padding: 1.5rem !important;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 1050;
}

.mega-title {
    color: var(--brand-highlight);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.mega-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-list li {
    margin-bottom: 0.25rem;
}

.mega-list a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-list a:hover {
    background-color: var(--brand-secondary);
    color: #ffffff !important;
    padding-left: 1rem;
}

.mega-list a i {
    width: 18px;
    opacity: 0.75;
}

/* 3. Two-Tier Navbar Layout */
.tier2-navbar {
    background-color: var(--brand-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    height: 44px; /* fixed height to prevent vertical layout shifts */
    z-index: 99;
    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.1);
    display: block;
}

.tier2-navbar > .container {
    display: flex;
    align-items: center;
    height: 100%;
}

.tier2-sub-nav {
    display: none;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
}

.tier2-sub-nav.active {
    display: flex;
}

.tier2-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.tier2-link:hover, .tier2-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Global Logo & Pie Brand sizing constraint (prevents layout shifts / resizing) */
.navbar-brand {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.navbar-brand i {
    font-size: 1.25rem !important;
}

@media (max-width: 991.98px) {
    body.layout-sidebar {
        flex-direction: column;
    }
    body.layout-sidebar .app-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        min-height: auto;
    }
    body.layout-sidebar.gradient-enabled .app-content-wrapper::before {
        left: 0;
    }
}

/* Classic layout dropdown hover visibility */
.layout-current .navbar-nav .dropdown:hover .dropdown-menu {
    display: block !important;
    margin-top: 0 !important;
}
