@font-face { font-family: 'Tajawal'; font-weight: 400; src: url('../vendor/fonts/tajawal-400.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 700; src: url('../vendor/fonts/tajawal-700.woff2') format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 400; src: url('../vendor/fonts/tajawal-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF; }
@font-face { font-family: 'Tajawal'; font-weight: 700; src: url('../vendor/fonts/tajawal-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF; }

/* ==========================================================================
   Design System & Color Palette Tokens (Approved Palette)
   ========================================================================== */
:root {
    /* Primary Brand: #0E3D32 (Deep Forest Green) */
    --primary-brand: #0E3D32;
    --brand: #0E3D32;
    --brand-dark: #07261F;
    --brand-light: #EBF3F0;
    --brand-light-hover: #DEECE8;

    /* Secondary Accent: #17A88B (Soft Seafoam / Mint) */
    --secondary-accent: #17A88B;
    --secondary-accent-light: rgba(23, 168, 139, 0.12);
    --secondary-accent-hover: #128B73;

    /* Ambient Accent 1: #B68E2D (Warm Gold / Olive Ochre) */
    --ambient-accent-1: #B68E2D;
    --ambient-accent-1-light: rgba(182, 142, 45, 0.12);
    --ambient-accent-1-hover: #9E7923;

    /* Ambient Accent 2: #DE9B18 (Bright Amber Glow) */
    --ambient-accent-2: #DE9B18;
    --ambient-accent-2-light: rgba(222, 155, 24, 0.12);
    --ambient-accent-2-hover: #C58610;

    /* Light Background: #F6F9FA (Off-White / Pale Ice) */
    --bg: #F6F9FA;

    /* Surface / Card: #FFFFFF (Pure White) */
    --surface: #FFFFFF;

    /* Text Primary: #132238 (Dark Slate Navy) */
    --text-primary: #132238;

    /* Text Secondary: #7A869A (Muted Slate Gray) */
    --text-secondary: #7A869A;

    /* Border & Stroke: #E5EBF0 (Subtle Gray Border) */
    --border: #E5EBF0;
    --border-stroke: #E5EBF0;

    /* Semantic Aliases */
    --accent: #B68E2D;

    /* Approved Gradients */
    /* Header / Hero Gradient: Diagonal blend from Deep Forest Green through Olive to Warm Gold */
    --gradient-header: linear-gradient(135deg, #0E3D32 0%, #4A6038 50%, #B68E2D 100%);
    /* Glow Transition: Top-to-bottom blend from Deep Forest Green to Amber before merging into light sheet */
    --gradient-glow: linear-gradient(180deg, #0E3D32 0%, #DE9B18 70%, #F6F9FA 100%);
    /* Mesh Gradients & Warm Radial Backdrops */
    --gradient-radial-mesh: radial-gradient(circle at 15% 20%, #DE9B18 0%, #0E3D32 60%, #07261F 100%);
    --gradient-login: radial-gradient(circle at 20% 20%, #17A88B 0%, #0E3D32 55%, #07261F 100%);
    --gradient-kpi-subtle: linear-gradient(135deg, rgba(23, 168, 139, 0.05) 0%, rgba(14, 61, 50, 0.02) 100%);

    /* Elevation Shadows */
    --shadow-sm: 0 1px 3px rgba(19, 34, 56, 0.04);
    --shadow-card: 0 3px 14px -1px rgba(14, 61, 50, 0.04), 0 1px 4px rgba(19, 34, 56, 0.02);
    --shadow-card-hover: 0 10px 26px -3px rgba(14, 61, 50, 0.09), 0 3px 8px rgba(19, 34, 56, 0.04);
    --shadow-dropdown: 0 16px 36px -4px rgba(19, 34, 56, 0.12), 0 6px 14px -2px rgba(19, 34, 56, 0.06);

    /* Dimensions */
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 72px;
    --topbar-height: 66px;
}

/* ==========================================================================
   Base Scaffolding & Typography
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-brand);
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
a:hover {
    color: var(--secondary-accent);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.35;
}

.font-monospace-numbers {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ==========================================================================
   Application Shell: Layout Architecture
   ========================================================================== */
.bytak-app-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg);
    position: relative;
    width: 100%;
}

/* Main Content Workspace Wrapper */
.bytak-main-wrapper {
    flex: 1;
    min-width: 0;
    margin-inline-start: var(--sidebar-width-collapsed);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-inline-start .28s cubic-bezier(0.4, 0, 0.2, 1);
}

.bytak-app-container.bytak-sidebar-pinned .bytak-main-wrapper {
    margin-inline-start: var(--sidebar-width);
}

.bytak-content-workspace {
    flex: 1;
    padding: 1.5rem 1.75rem;
    background-color: var(--bg);
}

/* ==========================================================================
   Modern Collapsible Vertical Sidebar (Collapsed by Default, Expand on Hover)
   ========================================================================== */
.bytak-sidebar {
    width: var(--sidebar-width-collapsed);
    height: 100vh;
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    z-index: 1040;
    background: var(--surface);
    border-inline-end: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width .26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .26s ease, transform .28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(14, 61, 50, 0.03);
    overflow: visible;
}

/* Hover-expanded, mobile-drawer, and pinned states */
.bytak-sidebar:hover,
.bytak-sidebar.is-hovered,
.bytak-sidebar.mobile-open,
.bytak-app-container.bytak-sidebar-pinned .bytak-sidebar {
    width: var(--sidebar-width);
    z-index: 1050;
    box-shadow: -8px 0 32px rgba(14, 61, 50, 0.16), -2px 0 10px rgba(19, 34, 56, 0.05);
}
[dir="ltr"] .bytak-sidebar:hover,
[dir="ltr"] .bytak-sidebar.is-hovered,
[dir="ltr"] .bytak-sidebar.mobile-open,
[dir="ltr"] .bytak-app-container.bytak-sidebar-pinned .bytak-sidebar {
    box-shadow: 8px 0 32px rgba(14, 61, 50, 0.16), 2px 0 10px rgba(19, 34, 56, 0.05);
}

/* Sidebar Header & Brand */
.bytak-sidebar .sidebar-header {
    height: var(--topbar-height);
    padding: 0 0.85rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
    gap: 0.65rem;
    transition: padding .25s ease, justify-content .25s ease;
}

.bytak-sidebar:not(:hover):not(.is-hovered) .sidebar-header {
    justify-content: center;
    padding: 0 0.5rem;
}

.bytak-app-container.bytak-sidebar-pinned .bytak-sidebar .sidebar-header {
    justify-content: flex-start !important;
    padding: 0 0.85rem !important;
}

.bytak-sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    min-width: 0;
}

.bytak-sidebar:not(:hover):not(.is-hovered) .sidebar-brand {
    justify-content: center;
    margin: 0 auto;
}

.bytak-app-container.bytak-sidebar-pinned .bytak-sidebar .sidebar-brand {
    justify-content: flex-start !important;
    margin: 0 !important;
}

/* Optimized Brand Emblem/Mark (Centered in 72px rail) */
.sidebar-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(14, 61, 50, 0.06);
    transition: all .2s ease;
}

.sidebar-brand-mark .brand-logo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.bytak-sidebar .sidebar-brand-text {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0;
    max-width: 0;
    transition: opacity .22s ease, max-width .26s ease;
}

.bytak-sidebar:hover .sidebar-brand-text,
.bytak-sidebar.is-hovered .sidebar-brand-text,
.bytak-app-container.bytak-sidebar-pinned .sidebar-brand-text {
    opacity: 1;
    max-width: 175px;
}

.bytak-sidebar .brand-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-brand);
    display: block;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bytak-sidebar .brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.badge-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary-accent);
    display: inline-block;
    flex-shrink: 0;
}

/* Pin Button (NEVER shown in collapsed state, shown only on hover/pinned) */
.btn-sidebar-pin {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    display: none !important;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
    margin-inline-start: auto;
}
.btn-sidebar-pin:hover {
    background: var(--brand-light);
    color: var(--primary-brand);
    border-color: var(--primary-brand);
}
.bytak-sidebar:hover .btn-sidebar-pin,
.bytak-sidebar.is-hovered .btn-sidebar-pin,
.bytak-app-container.bytak-sidebar-pinned .btn-sidebar-pin {
    display: flex !important;
}

.btn-sidebar-close {
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Sidebar Search (Smoothly expands on hover) */
.sidebar-search-wrap {
    padding: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    border-bottom: 0;
    transition: max-height .25s ease, opacity .22s ease, padding .25s ease;
    flex-shrink: 0;
}

.bytak-sidebar:hover .sidebar-search-wrap,
.bytak-sidebar.is-hovered .sidebar-search-wrap,
.bytak-app-container.bytak-sidebar-pinned .sidebar-search-wrap {
    padding: 0.75rem 1rem;
    max-height: 60px;
    opacity: 1;
    border-bottom: 1px solid var(--border);
}

.sidebar-search-box {
    position: relative;
    width: 100%;
}

.sidebar-search-box .search-icon {
    position: absolute;
    inset-inline-start: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.82rem;
    pointer-events: none;
}

.sidebar-search-input {
    width: 100%;
    height: 35px;
    padding-inline-start: 32px;
    padding-inline-end: 28px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text-primary);
    transition: all .18s ease;
}

.sidebar-search-input:focus {
    background-color: #fff;
    border-color: var(--secondary-accent);
    box-shadow: 0 0 0 3px rgba(23, 168, 139, 0.14);
    outline: none;
}

.btn-search-clear {
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
}

/* Sidebar Navigation Items */
.sidebar-nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.55rem;
}

.sidebar-group {
    margin-bottom: 0.9rem;
}

.sidebar-group-heading {
    padding: 0.35rem 0.5rem 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 22px;
}

.sidebar-group-heading .heading-text {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity .2s ease, max-width .22s ease;
}

.bytak-sidebar:hover .sidebar-group-heading .heading-text,
.bytak-sidebar.is-hovered .sidebar-group-heading .heading-text,
.bytak-app-container.bytak-sidebar-pinned .sidebar-group-heading .heading-text {
    opacity: 1;
    max-width: 200px;
}

.sidebar-group-heading .heading-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.sidebar-nav-item {
    margin-bottom: 3px;
    position: relative;
}

.sidebar-nav-btn,
.sidebar-nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.52rem 0.65rem;
    border-radius: 9px;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .16s ease;
    cursor: pointer;
    text-align: start;
    user-select: none;
    overflow: hidden;
}

.sidebar-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--bg);
    color: var(--primary-brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    margin-inline-end: 10px;
    transition: all .18s ease;
}

.sidebar-icon-wrap i,
.sidebar-icon-wrap .bi {
    background: transparent !important;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon-wrap i::before,
.sidebar-icon-wrap .bi::before {
    vertical-align: 0 !important;
    line-height: 1 !important;
    display: block;
}

.sidebar-item-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    opacity: 0;
    max-width: 0;
    transition: opacity .2s ease, max-width .22s ease;
}

.sidebar-arrow {
    margin-inline-start: auto;
    font-size: 0.72rem;
    color: var(--text-secondary);
    transition: transform .22s ease, opacity .2s ease;
    flex-shrink: 0;
    opacity: 0;
}

.sidebar-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    opacity: 0;
    transition: opacity .2s ease;
}

.sidebar-nav-btn[aria-expanded="true"] .sidebar-arrow {
    transform: rotate(180deg);
    color: var(--secondary-accent);
}

/* Expanded state item elements */
.bytak-sidebar:hover .sidebar-item-label,
.bytak-sidebar.is-hovered .sidebar-item-label,
.bytak-app-container.bytak-sidebar-pinned .sidebar-item-label {
    opacity: 1;
    max-width: 180px;
}

.bytak-sidebar:hover .sidebar-arrow,
.bytak-sidebar.is-hovered .sidebar-arrow,
.bytak-app-container.bytak-sidebar-pinned .sidebar-arrow {
    opacity: 1;
}

.bytak-sidebar:hover .sidebar-badge,
.bytak-sidebar.is-hovered .sidebar-badge,
.bytak-app-container.bytak-sidebar-pinned .sidebar-badge {
    opacity: 1;
}

.sidebar-nav-btn:hover,
.sidebar-nav-link:hover {
    background: var(--brand-light);
    color: var(--primary-brand);
}

.sidebar-nav-btn:hover .sidebar-icon-wrap,
.sidebar-nav-link:hover .sidebar-icon-wrap {
    background: var(--primary-brand);
    color: #fff !important;
    transform: scale(1.04);
}

.sidebar-nav-btn:hover .sidebar-icon-wrap i,
.sidebar-nav-link:hover .sidebar-icon-wrap i {
    background: transparent !important;
    color: #fff !important;
}

.sidebar-nav-link.active,
.sidebar-nav-btn.active {
    background: linear-gradient(90deg, rgba(14, 61, 50, 0.08) 0%, rgba(23, 168, 139, 0.14) 100%);
    color: var(--primary-brand);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(23, 168, 139, 0.22);
}

.sidebar-nav-link.active .sidebar-icon-wrap,
.sidebar-nav-btn.active .sidebar-icon-wrap {
    background: linear-gradient(135deg, var(--primary-brand) 0%, var(--secondary-accent) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(23, 168, 139, 0.26);
}

.sidebar-nav-link.active .sidebar-icon-wrap i,
.sidebar-nav-btn.active .sidebar-icon-wrap i {
    background: transparent !important;
    color: #ffffff !important;
}

.sidebar-submenu .sidebar-nav-link.active {
    background: linear-gradient(135deg, var(--primary-brand) 0%, #145949 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 61, 50, 0.18);
}

.sidebar-submenu .sidebar-nav-link.active .sidebar-icon-wrap {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    box-shadow: none;
}

.sidebar-submenu-wrapper {
    display: none;
}
.bytak-sidebar:hover .sidebar-submenu-wrapper.show,
.bytak-sidebar.is-hovered .sidebar-submenu-wrapper.show,
.bytak-app-container.bytak-sidebar-pinned .sidebar-submenu-wrapper.show {
    display: block;
}

.sidebar-submenu {
    padding-inline-start: 1.1rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    margin-inline-start: 1rem;
    border-inline-start: 2px solid var(--border);
}

.sidebar-submenu .sidebar-nav-link,
.sidebar-submenu .sidebar-nav-btn {
    padding: 0.42rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 550;
}

.sidebar-submenu .sidebar-icon-wrap {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    margin-inline-end: 8px;
    border-radius: 6px;
}

.sidebar-submenu .sidebar-submenu {
    margin-inline-start: 0.7rem;
    padding-inline-start: 0.8rem;
}

/* ==========================================================================
   Navigation Items & Structure: Collapsed Rail Mode (Centered Icons & Clean Dividers)
   ========================================================================== */
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-scroll {
    padding: 0.65rem 0 !important;
    overflow-x: hidden !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-group {
    margin-bottom: 0.65rem !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-group-heading {
    justify-content: center !important;
    padding: 0.35rem 0 !important;
    width: 100% !important;
    min-height: auto;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-group-heading .heading-text {
    display: none !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-group-heading .heading-line {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    height: 2px !important;
    margin: 0 auto !important;
    background: var(--border) !important;
    border-radius: 2px !important;
    flex: none !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-item {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 6px !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-btn,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-link {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    background: transparent;
    border: 0 !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-icon-wrap {
    width: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    margin-inline-end: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    font-size: 1.22rem !important;
    background: transparent !important;
    color: var(--text-primary);
    transition: all .2s ease;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-btn:hover,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-link:hover {
    background: var(--brand-light) !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-btn:hover .sidebar-icon-wrap,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-link:hover .sidebar-icon-wrap {
    color: var(--primary-brand) !important;
    transform: scale(1.08);
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-btn.active,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-link.active {
    background: linear-gradient(135deg, var(--primary-brand) 0%, #145949 100%) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(23, 168, 139, 0.38) !important;
    box-shadow: 0 6px 16px -2px rgba(14, 61, 50, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    position: relative;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-item:has(> .sidebar-nav-btn.active)::before,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-item:has(> .sidebar-nav-link.active)::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    border-start-end-radius: 4px;
    border-end-end-radius: 4px;
    background: var(--secondary-accent);
    box-shadow: 0 0 8px rgba(23, 168, 139, 0.45);
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-btn.active .sidebar-icon-wrap,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-link.active .sidebar-icon-wrap,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-btn.active .sidebar-icon-wrap i,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-nav-link.active .sidebar-icon-wrap i {
    background: transparent !important;
    box-shadow: none !important;
    color: #FFFFFF !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-item-label,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-arrow,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-badge,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-submenu-wrapper {
    display: none !important;
}

/* ==========================================================================
   Sidebar Footer & User Profile Section (Centered in Rail, High-Z-Index Dropup)
   ========================================================================== */
.bytak-sidebar .sidebar-footer {
    padding: 0.65rem 0.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    position: relative !important;
    z-index: 1060 !important;
    overflow: visible !important;
    transition: padding .25s ease;
}

.bytak-sidebar:hover .sidebar-footer,
.bytak-sidebar.is-hovered .sidebar-footer,
.bytak-sidebar.mobile-open .sidebar-footer,
.bytak-app-container.bytak-sidebar-pinned .sidebar-footer {
    padding: 0.75rem 0.85rem;
}

.sidebar-user-pill {
    padding: 0;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    transition: all .2s ease;
    overflow: visible !important;
    position: relative !important;
}

.bytak-sidebar:hover .sidebar-user-pill,
.bytak-sidebar.is-hovered .sidebar-user-pill,
.bytak-sidebar.mobile-open .sidebar-user-pill,
.bytak-app-container.bytak-sidebar-pinned .sidebar-user-pill {
    padding: 0.45rem 0.65rem;
    background: var(--bg);
    border-color: var(--border);
}

.sidebar-user-pill:hover {
    background: var(--brand-light);
    border-color: rgba(14, 61, 50, 0.2);
}

.sidebar-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    overflow: visible;
}

.bytak-sidebar:hover .sidebar-user-btn,
.bytak-sidebar.is-hovered .sidebar-user-btn,
.bytak-sidebar.mobile-open .sidebar-user-btn,
.bytak-app-container.bytak-sidebar-pinned .sidebar-user-btn {
    justify-content: flex-start;
}

/* Collapsed footer & user pill centering */
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-footer {
    padding: 0.75rem 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-user-pill {
    width: 46px !important;
    height: 46px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 12px !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-user-btn {
    width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-user-btn::after {
    display: none !important;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-user-info,
#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-user-dots {
    display: none !important;
}

/* User Avatar Wrapper & Status Indicator */
.sidebar-user-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-user-avatar-wrap {
    width: 42px !important;
    height: 42px !important;
    margin: 0 auto !important;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-header);
    color: #fff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(14, 61, 50, 0.2);
    border: 2px solid #FFFFFF;
    transition: transform .2s ease, box-shadow .2s ease;
}

#appContainer:not(.bytak-sidebar-pinned) .bytak-sidebar:not(:hover):not(.is-hovered):not(.mobile-open) .sidebar-user-avatar {
    width: 42px !important;
    height: 42px !important;
}

.sidebar-user-btn:hover .sidebar-user-avatar {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(14, 61, 50, 0.28);
}

.user-status-indicator {
    position: absolute;
    bottom: 1px;
    inset-inline-end: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary-accent);
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 0 1px rgba(23, 168, 139, 0.4);
}

.sidebar-user-info {
    min-width: 0;
    text-align: start;
    line-height: 1.25;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity .2s ease, max-width .22s ease;
}

.sidebar-user-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 3px;
    max-width: 100%;
    overflow: hidden;
}

.sidebar-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1.5px 8px;
    border-radius: 999px;
    background: rgba(23, 168, 139, 0.12);
    color: #0E3D32;
    border: 1px solid rgba(23, 168, 139, 0.28);
    font-size: 11px;
    font-weight: 600;
    max-width: 100%;
    line-height: 1.25;
    letter-spacing: 0.15px;
    white-space: nowrap;
}

[data-bs-theme="dark"] .sidebar-role-badge {
    background: rgba(23, 168, 139, 0.22);
    color: #34d399;
    border-color: rgba(23, 168, 139, 0.4);
}

.sidebar-role-badge i {
    font-size: 10px;
    color: var(--secondary-accent);
    flex-shrink: 0;
}

.sidebar-role-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-dots {
    opacity: 0;
    transition: opacity .2s ease;
    flex-shrink: 0;
}

.bytak-sidebar:hover .sidebar-user-info,
.bytak-sidebar.is-hovered .sidebar-user-info,
.bytak-sidebar.mobile-open .sidebar-user-info,
.bytak-app-container.bytak-sidebar-pinned .sidebar-user-info {
    opacity: 1;
    max-width: 160px;
}

.bytak-sidebar:hover .sidebar-user-dots,
.bytak-sidebar.is-hovered .sidebar-user-dots,
.bytak-sidebar.mobile-open .sidebar-user-dots,
.bytak-app-container.bytak-sidebar-pinned .sidebar-user-dots {
    opacity: 1;
}

/* ==========================================================================
   High-Z-Index User Dropdown Menu
   ========================================================================== */
.sidebar-user-menu {
    z-index: 99999 !important;
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 10px !important;
    min-width: 250px !important;
    max-width: 280px !important;
    border-radius: 14px !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 16px 36px rgba(14, 61, 50, 0.22), 0 4px 12px rgba(19, 34, 56, 0.08) !important;
    background: #FFFFFF !important;
    padding: 0.5rem !important;
}

[dir="rtl"] .sidebar-user-menu {
    text-align: right;
    inset-inline-end: 0 !important;
    inset-inline-start: auto !important;
    right: 0 !important;
    left: auto !important;
}

[dir="ltr"] .sidebar-user-menu {
    text-align: left;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    left: 0 !important;
    right: auto !important;
}

.sidebar-user-menu .dropdown-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    transition: all .16s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-user-menu .dropdown-item:hover,
.sidebar-user-menu .dropdown-item:focus {
    background: var(--brand-light);
    color: var(--primary-brand);
}

.sidebar-user-menu .dropdown-item.text-danger:hover,
.sidebar-user-menu .dropdown-item.text-danger:focus {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
}

/* ==========================================================================
   Modern Command Topbar
   ========================================================================== */
.bytak-topbar {
    height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 4px rgba(19, 34, 56, 0.02);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.topbar-leading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.btn-topbar-toggle {
    background: transparent;
    border: 0;
    color: var(--primary-brand);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.topbar-breadcrumb-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-home-link {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--primary-brand);
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    transition: all .16s ease;
}
.breadcrumb-home-link:hover {
    background: var(--brand-light);
    color: var(--primary-brand);
}

.breadcrumb-separator {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.breadcrumb-current-badge {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--primary-brand);
    background: var(--brand-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(14, 61, 50, 0.12);
}

.topbar-trailing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* External Portals Pills */
.portal-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.32rem 0.7rem;
    border-radius: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: all .18s ease;
}
.portal-pill-btn:hover {
    background: #fff;
    border-color: var(--secondary-accent);
    color: var(--secondary-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(23, 168, 139, 0.12);
}
.portal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.portal-arrow {
    font-size: 0.7rem;
    opacity: 0.7;
}

.topbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.35rem;
    align-self: center;
}

/* Dual Date Pill */
.topbar-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.32rem 0.8rem;
    border-radius: 20px;
    background: var(--ambient-accent-1-light);
    border: 1px solid rgba(182, 142, 45, 0.25);
    color: var(--ambient-accent-1);
    font-size: 0.82rem;
    font-weight: 700;
}
.topbar-date-pill .date-icon {
    font-size: 0.88rem;
}

/* Topbar Action Buttons */
.topbar-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}
.topbar-action-btn:hover {
    background: #fff;
    border-color: var(--primary-brand);
    color: var(--primary-brand);
    transform: translateY(-1px);
}

.permissions-pill {
    width: auto;
    padding: 0 0.75rem;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--secondary-accent);
    background: var(--secondary-accent-light);
    border-color: rgba(23, 168, 139, 0.25);
}
.permissions-pill:hover {
    background: var(--secondary-accent);
    color: #fff;
    border-color: var(--secondary-accent);
}

.lang-pill {
    width: auto;
    padding: 0 0.65rem;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 700;
}

/* SaaS Company Switcher Pill */
.saas-tenant-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.75rem 0.25rem 0.5rem;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F4FAF8 100%);
    border: 1px solid rgba(23, 168, 139, 0.28);
    color: var(--primary-brand, #0e3d32);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    width: auto !important;
    max-width: 360px;
    box-shadow: 0 2px 6px rgba(14, 61, 50, 0.04);
}
.saas-tenant-pill::after {
    display: none !important;
}
.saas-tenant-pill:hover,
.saas-tenant-pill:focus,
.saas-tenant-pill[aria-expanded="true"] {
    background: #FFFFFF;
    border-color: var(--secondary-accent, #17A88B);
    box-shadow: 0 4px 14px rgba(23, 168, 139, 0.16);
    transform: translateY(-1px);
    color: var(--primary-brand, #0e3d32);
}
.saas-tenant-pill .tenant-icon-wrap {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-light, #eef6f4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-brand, #0e3d32);
    font-size: 0.75rem;
    flex-shrink: 0;
}
.saas-tenant-pill .tenant-label-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: inline-block;
    font-size: 0.78rem;
}
.saas-tenant-pill .tenant-pkg-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(23, 168, 139, 0.12);
    color: var(--primary-brand, #0e3d32);
    border: 1px solid rgba(23, 168, 139, 0.25);
    flex-shrink: 0;
}
.saas-tenant-pill .tenant-pkg-tag.global-tag {
    background: rgba(182, 142, 45, 0.12);
    color: #926C15;
    border-color: rgba(182, 142, 45, 0.3);
}
.saas-tenant-pill .tenant-caret {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.saas-tenant-pill[aria-expanded="true"] .tenant-caret {
    transform: rotate(180deg);
}
.saas-tenant-menu {
    width: 420px !important;
    max-width: calc(100vw - 2rem) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 45px rgba(14, 61, 50, 0.16), 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid var(--border) !important;
    background: #ffffff !important;
    overflow: hidden;
    margin-top: 0.5rem !important;
}
.saas-tenant-list .dropdown-item {
    transition: all 0.15s ease;
    border: 1px solid transparent;
}
.saas-tenant-list .dropdown-item:hover {
    background: #F4FAF8;
    border-color: rgba(23, 168, 139, 0.2);
}
.saas-tenant-list .dropdown-item.active-tenant-item {
    background: var(--brand-light, #eef6f4);
    border-color: rgba(23, 168, 139, 0.35);
}
.tenant-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--brand-light, #eef6f4);
    color: var(--primary-brand, #0e3d32);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.tenant-avatar.global-avatar {
    background: rgba(182, 142, 45, 0.15);
    color: #926C15;
}

/* Notifications Counter Pill & Wrapper */
.notif-dropdown-wrap {
    position: relative;
    z-index: 10;
}

.notif-bell-pill {
    width: auto !important;
    height: 36px;
    padding: 0 0.65rem 0 0.5rem;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(14, 61, 50, 0.04);
}
.notif-bell-pill::after {
    display: none !important;
}
.notif-bell-pill:hover,
.notif-bell-pill:focus,
.notif-bell-pill[aria-expanded="true"] {
    background: #FFFFFF;
    border-color: var(--ambient-accent-2, #DE9B18);
    box-shadow: 0 4px 14px rgba(222, 155, 24, 0.18);
    transform: translateY(-1px);
    color: var(--ambient-accent-2, #DE9B18);
}
.notif-bell-pill .notif-bell-icon {
    font-size: 0.95rem;
    color: var(--ambient-accent-2, #DE9B18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.notif-counter-pill {
    background: linear-gradient(135deg, #DE9B18 0%, #B68E2D 100%) !important;
    color: #FFFFFF !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    padding: 0.22rem 0.5rem !important;
    border-radius: 999px !important;
    box-shadow: 0 2px 6px rgba(182, 142, 45, 0.35) !important;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
}

/* ==========================================================================
   Executive Notifications Dropdown Menu
   ========================================================================== */
.notif-dropdown-menu {
    width: 380px !important;
    max-width: calc(100vw - 2rem) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 36px rgba(14, 61, 50, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid var(--border) !important;
    background: #ffffff !important;
    overflow: hidden;
    margin-top: 0.5rem !important;
}

.notif-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1rem;
}

.notif-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(222, 155, 24, 0.12);
    color: var(--ambient-accent-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    transition: all 0.16s ease;
    border: 1px solid transparent;
    margin-bottom: 4px;
}

.notif-item:hover {
    background: var(--brand-light);
    border-color: rgba(14, 61, 50, 0.08);
}

.notif-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.notif-item-desc {
    font-size: 0.73rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

.topbar-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 4px;
    border-radius: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    transition: all .18s ease;
    cursor: pointer;
}
.topbar-profile-btn:hover {
    background: var(--brand-light);
    border-color: rgba(14, 61, 50, 0.2);
}

.profile-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 800;
}

.profile-name-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}
.profile-arrow {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Modern Cards, Panels & Metric Widgets
   ========================================================================== */
.card-modern, .card, .page-card, .box.round {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    transition: transform .2s ease, box-shadow .2s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.page-card > .page-head, .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-card > .page-head h1, .card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-brand);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-card > .page-body, .card-body {
    padding: 1.4rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Modern Executive KPI Stat Card */
.bytak-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: all .22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bytak-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-brand);
    opacity: 0;
    transition: opacity .2s ease;
}

.bytak-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--secondary-accent);
}

.bytak-kpi-card:hover::before {
    opacity: 1;
}

.kpi-card-content {
    min-width: 0;
}

.kpi-card-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.kpi-card-label {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
}

.kpi-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-inline-start: 1rem;
    transition: transform .2s ease;
}

.bytak-kpi-card:hover .kpi-card-icon {
    transform: scale(1.08);
}

/* ==========================================================================
   Modern Data Tables & Grids
   ========================================================================== */
.table-responsive {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.table-app, .table {
    margin-bottom: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-app thead th, .table thead th {
    background: #F8FAFC !important;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 0.9rem 1rem;
    border-bottom: 2px solid var(--border);
    border-top: 0;
    vertical-align: middle;
    white-space: nowrap;
}

.table-app tbody td, .table tbody td {
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    transition: background-color .15s ease;
}

.table-app tbody tr:hover td, .table tbody tr:hover td {
    background-color: #F4F8F7;
}

.table-app tbody tr:last-child td, .table tbody tr:last-child td {
    border-bottom: 0;
}

.table-app .num {
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Soft Badges & Status Indicators
   ========================================================================== */
.badge {
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

.badge-soft-success, .badge.bg-success {
    background-color: rgba(23, 168, 139, 0.12) !important;
    color: #17A88B !important;
    border: 1px solid rgba(23, 168, 139, 0.3);
}

.badge-soft-warning, .badge.bg-warning {
    background-color: rgba(222, 155, 24, 0.12) !important;
    color: #C58610 !important;
    border: 1px solid rgba(222, 155, 24, 0.3);
}

.badge-soft-danger, .badge.bg-danger {
    background-color: rgba(214, 48, 49, 0.12) !important;
    color: #D63031 !important;
    border: 1px solid rgba(214, 48, 49, 0.28);
}

.badge-soft-primary, .badge.bg-primary {
    background-color: rgba(14, 61, 50, 0.1) !important;
    color: #0E3D32 !important;
    border: 1px solid rgba(14, 61, 50, 0.25);
}

.badge-soft-info, .badge.bg-info {
    background-color: rgba(13, 202, 240, 0.12) !important;
    color: #0B7C94 !important;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

/* Ambient Badges */
.badge-ambient-1, .badge-gold {
    background-color: var(--ambient-accent-1) !important;
    color: #fff !important;
}

.badge-ambient-2, .badge-amber {
    background-color: var(--ambient-accent-2) !important;
    color: #fff !important;
}

/* ==========================================================================
   Modern Forms, Inputs & Enhanced Dropdowns (RTL & LTR Safe)
   ========================================================================== */
.form-control {
    border-radius: 9px;
    border: 1px solid var(--border);
    font-size: 0.88rem;
    padding: 0.55rem 0.85rem;
    color: var(--text-primary);
    background-color: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.form-control-sm {
    border-radius: 8px;
    font-size: 0.82rem;
    padding: 0.38rem 0.75rem;
}

.form-select {
    border-radius: 9px;
    border: 1px solid #DCE4EC;
    font-size: 0.86rem;
    font-weight: 600;
    padding-top: 0.52rem;
    padding-bottom: 0.52rem;
    padding-inline-start: 0.85rem !important;
    padding-inline-end: 2.35rem !important;
    color: var(--text-primary);
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230E3D32' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 13px 10px;
    box-shadow: 0 1px 2px rgba(19, 34, 56, 0.03);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

[dir="ltr"] .form-select {
    background-position: right 0.75rem center;
}

.form-select:hover {
    border-color: rgba(23, 168, 139, 0.55);
    background-color: #FCFDFE;
}

.form-select-sm {
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    padding-top: 0.38rem;
    padding-bottom: 0.38rem;
    padding-inline-start: 0.75rem !important;
    padding-inline-end: 2.15rem !important;
    background-position: left 0.65rem center;
    background-size: 12px 9px;
    min-height: 34px;
}

[dir="ltr"] .form-select-sm {
    background-position: right 0.65rem center;
}

/* Table Header Filter Dropdowns */
.table-app thead th .form-select,
.table thead th .form-select {
    min-width: 132px;
    width: auto;
    background-color: #FFFFFF;
    border: 1px solid #D5E0EA;
    border-radius: 8px;
    color: var(--primary-brand);
    font-weight: 700;
    font-size: 0.79rem;
    box-shadow: 0 1px 3px rgba(14, 61, 50, 0.05);
}

.table-app thead th .form-select:hover,
.table thead th .form-select:hover {
    border-color: var(--secondary-accent);
    background-color: #F4FAF8;
    box-shadow: 0 3px 8px rgba(23, 168, 139, 0.12);
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-accent) !important;
    box-shadow: 0 0 0 3px rgba(23, 168, 139, 0.16) !important;
    outline: none;
}

/* Enhanced Bootstrap Dropdown Menus */
.dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-dropdown);
    padding: 0.45rem;
    font-size: 0.85rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.48rem 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color .15s ease, color .15s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--brand-light);
    color: var(--primary-brand);
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-brand);
    color: #fff;
}

/* Empty State Styling inside Tables & Cards */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    text-align: center;
}

.empty-state i {
    font-size: 2rem;
    color: var(--secondary-accent);
    opacity: 0.7;
    line-height: 1;
}

.form-label {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    display: block;
}

.form-label .req {
    color: #d63031;
}

.form-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    background: var(--surface);
    overflow: hidden;
}

.form-section > .fs-head {
    background: #F8FAFC;
    padding: 0.75rem 1.1rem;
    font-weight: 700;
    color: var(--primary-brand);
    border-bottom: 1px solid var(--border);
}

.form-section > .fs-body {
    padding: 1.1rem;
}

/* ==========================================================================
   Primary CTAs & Action Buttons
   ========================================================================== */
.btn-brand, .btn-primary {
    background-color: var(--primary-brand) !important;
    border-color: var(--primary-brand) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 9px;
    padding: 0.5rem 1.1rem;
    box-shadow: 0 2px 8px rgba(14, 61, 50, 0.16);
    transition: all .18s ease;
}

.btn-brand:hover, .btn-primary:hover,
.btn-brand:focus, .btn-primary:focus,
.btn-brand:active, .btn-primary:active {
    background-color: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(14, 61, 50, 0.24);
}

.btn-outline-brand, .btn-outline-primary {
    color: var(--primary-brand) !important;
    border-color: var(--primary-brand) !important;
    font-weight: 700;
    border-radius: 9px;
}
.btn-outline-brand:hover, .btn-outline-primary:hover {
    background-color: var(--primary-brand) !important;
    color: #fff !important;
}

.btn-secondary-accent {
    background-color: var(--secondary-accent) !important;
    border-color: var(--secondary-accent) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(23, 168, 139, 0.2);
}
.btn-secondary-accent:hover {
    background-color: var(--secondary-accent-hover) !important;
    border-color: var(--secondary-accent-hover) !important;
    transform: translateY(-1px);
}

/* Modern Nav Tabs & Pills */
.nav-tabs {
    border-bottom: 1px solid var(--border);
}
.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: 1px solid transparent;
    font-weight: 700;
    padding: 0.65rem 1.1rem;
    border-radius: 8px 8px 0 0;
}
.nav-tabs .nav-link:hover {
    border-color: var(--border) var(--border) transparent;
    color: var(--primary-brand);
}
.nav-tabs .nav-link.active, .nav-pills .nav-link.active {
    background-color: var(--primary-brand) !important;
    color: #fff !important;
    border-color: var(--primary-brand) !important;
}

/* Pagination */
.pagination {
    margin: 0;
    gap: 4px;
}
.pagination .page-item.active .page-link {
    background-color: var(--primary-brand) !important;
    border-color: var(--primary-brand) !important;
    color: #fff !important;
    border-radius: 7px;
}
.pagination .page-link {
    color: var(--primary-brand);
    border-color: var(--border);
    border-radius: 7px;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
}
.pagination .page-link:hover {
    background-color: var(--brand-light);
    color: var(--primary-brand);
}

/* Modals */
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-dropdown);
    overflow: hidden;
}
.modal-header {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
}
.modal-footer {
    background: #F8FAFC;
    border-top: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
}

/* ==========================================================================
   Executive Dashboard Hero Card
   ========================================================================== */
.bytak-hero-card {
    background: var(--gradient-header);
    color: #fff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 24px -4px rgba(14, 61, 50, 0.22);
}

.bytak-hero-card::after {
    content: '';
    position: absolute;
    top: -50%;
    inset-inline-end: -10%;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(222, 155, 24, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.4rem;
}

.hero-subtitle {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 0;
    max-width: 650px;
}

.hero-action-btn {
    background: #fff;
    color: var(--primary-brand) !important;
    font-weight: 800;
    border-radius: 10px;
    padding: 0.6rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: all .2s ease;
}
.hero-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    background: var(--bg);
}

/* ==========================================================================
   Responsive & Mobile Drawer Behavior
   ========================================================================== */
.bytak-sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(19, 34, 56, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1035;
    opacity: 0;
    transition: opacity .25s ease;
}

@media (max-width: 991px) {
    .bytak-sidebar {
        width: var(--sidebar-width) !important;
        transform: translateX(100%);
        box-shadow: -4px 0 24px rgba(19, 34, 56, 0.18);
    }
    [dir="ltr"] .bytak-sidebar {
        transform: translateX(-100%);
    }

    .bytak-sidebar.mobile-open {
        transform: translateX(0);
    }

    .bytak-sidebar-backdrop.active {
        display: block;
        opacity: 1;
    }

    .bytak-main-wrapper {
        margin-inline-start: 0 !important;
    }

    .bytak-content-workspace {
        padding: 1rem;
    }
}

/* ==========================================================================
   Authentication & Login Page Styling
   ========================================================================== */
html:has(body.login-bg), body.login-bg {
    min-height: 100vh;
    height: 100%;
}

body.login-bg {
    min-height: 100vh;
    margin: 0;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F6F9FA;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(23, 168, 139, 0.08) 0%, rgba(14, 61, 50, 0.03) 40%, transparent 70%),
        radial-gradient(circle at 10% 90%, rgba(182, 142, 45, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 90% 85%, rgba(14, 61, 50, 0.04) 0%, transparent 45%);
    background-attachment: fixed;
    background-size: cover;
    box-sizing: border-box;
    overflow-x: hidden;
}

.login-wrapper {
    width: 100%;
    max-width: 490px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.login-card {
    width: 100% !important;
    max-width: 100% !important;
    background: #FFFFFF !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 45px -10px rgba(14, 61, 50, 0.10), 0 6px 18px rgba(19, 34, 56, 0.04) !important;
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
    margin: 0 auto;
    box-sizing: border-box;
}

.login-card:hover {
    box-shadow: 0 24px 50px -10px rgba(14, 61, 50, 0.13), 0 8px 22px rgba(19, 34, 56, 0.05) !important;
}

.login-card .card-body {
    padding: 2.25rem 1.75rem !important;
}

.login-brand-icon {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
    color: var(--brand);
    border-radius: 16px;
    font-size: 1.75rem;
    box-shadow: inset 0 0 0 1px rgba(23, 168, 139, 0.15);
    margin-bottom: 0.75rem;
    transition: transform .2s ease;
}

.login-card:hover .login-brand-icon {
    transform: scale(1.05);
}

.login-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-brand);
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 500;
}

.login-card .form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.login-card .input-group {
    border-radius: 11px;
    overflow: hidden;
    border: 1px solid var(--border);
    background-color: #FFFFFF;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.login-card .input-group:focus-within {
    border-color: var(--secondary-accent) !important;
    box-shadow: 0 0 0 3px rgba(23, 168, 139, 0.14) !important;
}

.login-card .input-group-text {
    background-color: #F8FAFB;
    border: none;
    border-inline-end: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 0.65rem 0.95rem;
}

.login-card .form-control {
    font-size: 0.9rem;
    padding: 0.65rem 0.95rem;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-primary);
    background-color: #FFFFFF;
}

.login-card .form-control:focus {
    border: none !important;
    box-shadow: none !important;
    background-color: #FFFFFF;
}

.login-card .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    border-color: #CCD6DE;
    cursor: pointer;
}

.login-card .form-check-input:checked {
    background-color: var(--secondary-accent);
    border-color: var(--secondary-accent);
}

.login-card .form-check-label {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.login-card .btn-login {
    background: linear-gradient(135deg, var(--primary-brand) 0%, #155546 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 11px;
    padding: 0.74rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 18px -2px rgba(14, 61, 50, 0.28);
    transition: all .2s ease;
}

.login-card .btn-login:hover {
    background: linear-gradient(135deg, #124b3d 0%, #17A88B 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 24px -2px rgba(14, 61, 50, 0.36);
    transform: translateY(-1px);
}

.login-card .btn-login:active {
    transform: translateY(0);
}

.login-lang-wrap {
    width: 100%;
    border-color: #EEF2F6 !important;
}

.login-lang-switch {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 5px;
    padding: 5px;
    background: #F3F6F8;
    border: 1px solid #E2E8F0;
    border-radius: 13px;
    width: 100%;
    box-sizing: border-box;
}

.login-lang-switch a {
    color: #475569;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.45rem 0.35rem;
    border-radius: 9px;
    border: 1px solid transparent;
    transition: all .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    white-space: nowrap;
    line-height: 1.2;
}

.login-lang-switch a .lang-flag {
    font-size: 0.9rem;
    line-height: 1;
}

.login-lang-switch a:hover {
    color: var(--primary-brand);
    background: rgba(255, 255, 255, 0.8);
}

.login-lang-switch a.active {
    color: var(--primary-brand);
    background: #FFFFFF;
    border-color: rgba(23, 168, 139, 0.35);
    box-shadow: 0 2px 8px rgba(14, 61, 50, 0.10);
}

.login-lang-divider {
    display: none !important;
}

@media (max-width: 500px) {
    body.login-bg {
        padding: 1rem 0.6rem;
    }
    .login-wrapper {
        width: 100%;
        max-width: 100%;
    }
    .login-card {
        border-radius: 16px !important;
    }
    .login-card .card-body {
        padding: 1.5rem 1rem !important;
    }
    .login-lang-switch {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 6px;
    }
    .login-lang-switch a {
        flex: 1 1 calc(33.333% - 6px);
        font-size: 0.75rem;
        padding: 0.42rem 0.45rem;
        background: rgba(255, 255, 255, 0.55);
        border-color: rgba(226, 232, 240, 0.8);
    }
    .login-lang-switch a.active {
        background: #FFFFFF;
        border-color: rgba(23, 168, 139, 0.4);
    }
}

/* SaaS Executive Hero, KPIs, Packages & Feature Matrix Luxury Styles */
.saas-exec-hero {
    background: linear-gradient(135deg, #07261f 0%, #0e3d32 48%, #156e5c 100%);
    color: #ffffff;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 34px -8px rgba(14, 61, 50, 0.28), 0 4px 12px rgba(19, 34, 56, 0.08);
    border: 1px solid rgba(23, 168, 139, 0.28);
}

.saas-exec-hero::before {
    content: '';
    position: absolute;
    inset-inline-end: -60px;
    top: -90px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23, 168, 139, 0.26) 0%, rgba(182, 142, 45, 0.08) 45%, transparent 70%);
    pointer-events: none;
}

.saas-exec-hero::after {
    content: '';
    position: absolute;
    inset-inline-start: 15%;
    bottom: -110px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(222, 155, 24, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.saas-hero-watermark {
    position: absolute;
    inset-inline-end: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9.5rem;
    line-height: 1;
    color: #ffffff;
    opacity: 0.055 !important;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.saas-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.saas-hero-pill.pill-accent {
    background: rgba(23, 168, 139, 0.24);
    border-color: rgba(52, 211, 153, 0.42);
    color: #ecfdf5;
}

.btn-saas-hero-primary {
    background: #ffffff;
    color: #0e3d32 !important;
    border: 1px solid #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.58rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(7, 38, 31, 0.22);
    transition: all 0.2s ease;
}

.btn-saas-hero-primary:hover {
    background: #f0fdf9;
    color: #07261f !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(7, 38, 31, 0.3);
}

.btn-saas-hero-glass {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.32);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.58rem 1.15rem;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.btn-saas-hero-glass:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.65);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* SaaS Executive KPI Stat Cards */
.saas-kpi-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5ebf0;
    padding: 1.25rem 1.35rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px -2px rgba(14, 61, 50, 0.05), 0 1px 4px rgba(19, 34, 56, 0.03);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.saas-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3.5px;
    background: var(--kpi-accent, #17A88B);
    opacity: 0.85;
}

.saas-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px -4px rgba(14, 61, 50, 0.10), 0 4px 10px rgba(19, 34, 56, 0.04);
    border-color: rgba(23, 168, 139, 0.35);
}

.saas-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.saas-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: #132238;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.saas-kpi-footer {
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px dashed #e8eef3;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.packages-hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(23, 168, 139, 0.18) !important;
}

.packages-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(23, 168, 139, 0.12);
    color: var(--secondary-accent, #17A88B);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.btn-emerald-gradient {
    background: linear-gradient(135deg, #0E3D32 0%, #17A88B 100%);
    border: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.btn-emerald-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(23, 168, 139, 0.35) !important;
    color: #fff;
}

/* Luxury Subscription Package Tier Cards */
.package-summary-card {
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff;
    box-shadow: 0 4px 18px -2px rgba(14, 61, 50, 0.05), 0 2px 6px rgba(19, 34, 56, 0.03);
    transition: transform .24s cubic-bezier(.4,0,.2,1), box-shadow .24s cubic-bezier(.4,0,.2,1), border-color .24s ease;
    position: relative;
    overflow: hidden;
}

.package-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 4px;
    background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 100%);
}

.package-summary-card.tier-popular {
    border: 2px solid rgba(23, 168, 139, 0.55) !important;
    box-shadow: 0 12px 30px -6px rgba(23, 168, 139, 0.15), 0 4px 10px rgba(14, 61, 50, 0.05) !important;
}

.package-summary-card.tier-popular::before {
    height: 5px;
    background: linear-gradient(90deg, #0E3D32 0%, #17A88B 55%, #10b981 100%);
}

.package-summary-card.tier-enterprise {
    border: 2px solid rgba(99, 102, 241, 0.45) !important;
    box-shadow: 0 12px 30px -6px rgba(99, 102, 241, 0.14), 0 4px 10px rgba(19, 34, 56, 0.05) !important;
}

.package-summary-card.tier-enterprise::before {
    height: 5px;
    background: linear-gradient(90deg, #4338ca 0%, #6366f1 55%, #b68e2d 100%);
}

.package-summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px -6px rgba(14, 61, 50, 0.14), 0 6px 14px rgba(19, 34, 56, 0.06) !important;
}

.package-tier-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.tier-popular .package-tier-icon {
    background: linear-gradient(135deg, rgba(14, 61, 50, 0.1) 0%, rgba(23, 168, 139, 0.18) 100%);
    color: #0E3D32;
    border-color: rgba(23, 168, 139, 0.35);
}

.tier-enterprise .package-tier-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(182, 142, 45, 0.16) 100%);
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.3);
}

.package-popular-tag,
.package-vip-tag,
.package-starter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.package-popular-tag {
    background: linear-gradient(135deg, #0E3D32 0%, #17A88B 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(23, 168, 139, 0.28);
}

.package-vip-tag {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.28);
}

.package-starter-tag {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.package-price-wrap {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tier-popular .package-price-wrap {
    background: linear-gradient(135deg, #f2fbf9 0%, #e6f7f3 100%);
    border-color: rgba(23, 168, 139, 0.28);
}

.tier-enterprise .package-price-wrap {
    background: linear-gradient(135deg, #f5f6ff 0%, #eef2ff 100%);
    border-color: rgba(99, 102, 241, 0.25);
}

.package-annual-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.package-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.package-meta-item {
    background: #f8fafc;
    border: 1px solid #e9eef4;
    border-radius: 10px;
    padding: 0.5rem 0.45rem;
    text-align: center;
}

.package-meta-item .meta-val {
    font-size: 0.85rem;
    font-weight: 800;
    color: #132238;
    display: block;
    line-height: 1.2;
}

.package-meta-item .meta-lbl {
    font-size: 0.68rem;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.matrix-table {
    border-collapse: separate;
    border-spacing: 0;
}

.matrix-table thead th {
    background: #f8fafc;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem 0.85rem;
}

.matrix-table tbody tr {
    transition: background-color .15s ease;
}

.matrix-table tbody tr:hover {
    background-color: rgba(23, 168, 139, 0.04) !important;
}

.matrix-category-header td {
    background: linear-gradient(90deg, rgba(23, 168, 139, 0.08) 0%, rgba(248, 250, 252, 0.8) 100%);
    font-weight: 700;
    font-size: 0.82rem;
    color: #0E3D32;
    padding: 0.65rem 1rem !important;
    border-top: 1px solid rgba(23, 168, 139, 0.2);
    border-bottom: 1px solid rgba(23, 168, 139, 0.15);
}

.pkg-feature-toggle {
    width: 2.9rem !important;
    height: 1.45rem !important;
    cursor: pointer;
    background-color: #cbd5e1;
    border-color: #cbd5e1;
    transition: all .2s cubic-bezier(.4,0,.2,1);
}

.pkg-feature-toggle:checked {
    background-color: #17A88B !important;
    border-color: #17A88B !important;
    box-shadow: 0 2px 8px rgba(23, 168, 139, 0.45) !important;
}

.pkg-feature-toggle:focus {
    box-shadow: 0 0 0 3px rgba(23, 168, 139, 0.2) !important;
    border-color: #17A88B !important;
}

.matrix-save-toast {
    position: fixed;
    bottom: 28px;
    inset-inline-end: 28px;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: #0E3D32;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(14, 61, 50, 0.35);
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInSlideUp 0.3s ease;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Overrides */
@media print {
    .bytak-sidebar, .bytak-topbar, .no-print, .toolbar, .pagination, .bytak-footer {
        display: none !important;
    }
    .bytak-main-wrapper {
        margin-inline-start: 0 !important;
    }
    body {
        background: #fff !important;
    }
    .page-card, .card {
        border: 0;
        box-shadow: none;
    }
}
