/* ============================================
   DESIGN SYSTEM - KPI/OKR Management System
   (Professional Blue Enterprise Theme)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root {
    /* === PROFESSIONAL BLUE PALETTE === */
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-darker: #0d3b7a;
    --primary-light: #e8f0fe;
    --primary-bg: rgba(26, 115, 232, 0.08);

    /* Accent */
    --accent: #ffffff;
    --accent-dark: #f8fafe;
    --accent-light: #ffffff;

    /* Success / Warning / Danger */
    --success: #0f9d58;
    --success-bg: #e6f4ea;
    --warning: #f29900;
    --warning-bg: #fef7e0;
    --danger: #d93025;
    --danger-bg: #fce8e6;
    --info: #4285f4;
    --info-bg: #e8f0fe;

    /* Glass Tokens */
    --glass-bg: #ffffff;
    --glass-bg-dark: #f8fafe;
    --glass-border: #dadce0;
    --glass-blur: none;
    --glass-shadow: 0 1px 3px rgba(26, 115, 232, 0.06), 0 1px 2px rgba(0, 0, 0, 0.06);
    --glass-shadow-hover: 0 8px 24px rgba(26, 115, 232, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);

    /* Sidebar - Professional Dark Blue */
    --sidebar-bg: linear-gradient(180deg, #0d2137 0%, #122b45 50%, #163659 100%);
    --sidebar-bg-solid: #0d2137;
    --sidebar-text: rgba(255, 255, 255, 0.65);
    --sidebar-text-active: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-width: 80px;
    --sidebar-width-expanded: 280px;

    /* Layout */
    --header-height: 68px;
    --body-bg: #f5f8fc;
    --card-bg: #ffffff;
    --card-border: #e1e8f0;
    --card-shadow: 0 1px 4px rgba(26, 115, 232, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 8px 28px rgba(26, 115, 232, 0.12);

    /* Text */
    --text-primary: #1a2940;
    --text-secondary: #3c4858;
    --text-muted: #6b7c93;
    --border-color: #e3e8ef;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.85rem;
    --font-size-base: 0.95rem;
    --font-size-md: 1.05rem;
    --font-size-lg: 1.15rem;
    --font-size-xl: 1.3rem;
    --font-size-2xl: 1.6rem;
    --font-size-3xl: 2rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

/* --- Base Reset & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--body-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: var(--font-size-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Removed Ambient Background Decoration (Loang màu) --- */
.app-blob-container {
    display: none;
}

.app-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: floatAmbient 20s infinite alternate ease-in-out;
}

.app-blob-1 { width: 500px; height: 500px; background: #f8bbd0; top: -150px; right: -100px; }
.app-blob-2 { width: 450px; height: 450px; background: #8c6a85; bottom: -100px; left: -100px; animation-delay: -5s; opacity: 0.15; }
.app-blob-3 { width: 300px; height: 300px; background: #d1c4e9; top: 40%; left: 10%; animation-delay: -10s; opacity: 0.2; }

@keyframes floatAmbient {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}

/* --- App Layout --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    background-color: var(--sidebar-bg-solid);
    border-right: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width var(--transition-slow);
    /* Bỏ overflow: hidden để bootstrap dropdown không bị clip */
    overflow: visible;
    box-shadow: 4px 0 24px rgba(13, 33, 55, 0.15);
}

html.sidebar-expanded .sidebar {
    width: var(--sidebar-width-expanded);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    flex-shrink: 0;
    position: relative;
}

.sidebar-brand::after {
    content: '';
    position: absolute;
    bottom: 0; left: 24px; right: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 14px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.35);
}

.sidebar-brand .brand-info {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

html.sidebar-expanded .sidebar-brand .brand-info {
    display: block;
    opacity: 1;
    visibility: visible;
}

.sidebar-brand .brand-text {
    color: #ffffff;
    font-size: var(--font-size-md);
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.sidebar-brand .brand-sub {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Menu groups */
.sidebar-group {
    margin-bottom: 8px;
}

.sidebar-group-label {
    padding: 16px 24px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    display: none;
}

html.sidebar-expanded .sidebar-group-label {
    display: block;
}

/* Menu items */
/* Menu items */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    
    /* --- GIỮ CHỮ 1 DÒNG & NỀN BAO BỌC HẾT CHỮ --- */
    white-space: nowrap; 
    width: auto;
    min-width: 0;
    overflow: hidden;
    
    margin: 2px 12px;
    border-radius: var(--radius-md);
    justify-content: center;
}

html.sidebar-expanded .sidebar-link {
    justify-content: flex-start;
    width: max-content;
    min-width: calc(100% - 24px);
}

.sidebar-link span {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

html.sidebar-expanded .sidebar-link span {
    display: inline-block;
    opacity: 1;
    visibility: visible;
}

.sidebar-link i {
    width: 22px;
    font-size: 1.1rem;
    margin-right: 0;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity var(--transition-fast), transform var(--transition-fast), margin 0.3s ease;
}

html.sidebar-expanded .sidebar-link i {
    margin-right: 12px;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(26, 115, 232, 0.2);
    transform: translateX(4px) translateY(-1px);
    box-shadow: none;
}

.sidebar-link:hover i {
    opacity: 1;
    color: #ffffff;
    transform: scale(1.1);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.3), rgba(66, 133, 244, 0.2));
    font-weight: 700;
    /* --- ACTIVE INDICATOR --- */
    border-right: 3px solid #4285f4;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    z-index: 1;
}

.sidebar-link.active i {
    opacity: 1;
    color: #4285f4;
}

/* Submenu toggle */
.sidebar-link[data-bs-toggle="collapse"] .menu-arrow {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform var(--transition-base);
    opacity: 0.5;
    display: none;
}

html.sidebar-expanded .sidebar-link[data-bs-toggle="collapse"] .menu-arrow {
    display: block;
}

.sidebar-link[data-bs-toggle="collapse"][aria-expanded="true"] .menu-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 4px 0 8px 0;
    margin: 0;
}

.sidebar-submenu .sidebar-link {
    padding-left: 58px;
    font-size: var(--font-size-xs);
    margin: 1px 12px;
}

.sidebar-submenu .sidebar-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    position: absolute;
    left: 36px;
    transition: all var(--transition-fast);
    opacity: 0.4;
}

.sidebar-submenu .sidebar-link:hover::before,
.sidebar-user .user-info, 
.sidebar-user .user-dots {
    display: none;
}

html.sidebar-expanded .sidebar-user .user-info, 
html.sidebar-expanded .sidebar-user .user-dots {
    display: block;
    opacity: 1;
    visibility: visible;
}

html.sidebar-expanded .sidebar-user .user-info {
    display: flex;
    flex-direction: column;
}

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

html.sidebar-expanded .main-content {
    margin-left: var(--sidebar-width-expanded);
}

/* --- TOP HEADER --- */
.top-header {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.3rem;
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}

.header-search {
    position: relative;
}

.header-search input {
    width: 320px;
    height: 42px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0 16px 0 44px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    background: var(--accent-dark);
    transition: all var(--transition-fast);
    outline: none;
    box-shadow: none;
}

.header-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
    background: #fff;
}

.header-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- Quick Search Results Dropdown --- */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    z-index: 1100;
    overflow: hidden;
    display: none;
    max-height: 480px;
}

.search-results-dropdown.show {
    display: block;
    animation: slideUpFade 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-results-inner {
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.search-results-inner::-webkit-scrollbar {
    width: 4px;
}

.search-results-inner::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

.search-section-header {
    padding: 12px 18px 6px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(0, 0, 0, 0.03);
    padding-left: 22px;
}

.search-item-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: var(--text-secondary);
    border-radius: 10px;
    margin-right: 14px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.search-item-info {
    flex: 1;
    min-width: 0;
}

.search-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.search-no-results {
    padding: 32px 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    font-size: 1.2rem;
}

.header-icon-btn:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 4px rgba(217, 48, 37, 0.14);
}

.notification-bell-btn {
    overflow: visible;
}

.notification-bell-btn.has-unread {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(26, 115, 232, 0.26);
}

.notification-bell-btn.has-unread::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: calc(var(--radius-md) + 5px);
    border: 1px solid rgba(26, 115, 232, 0.16);
    animation: notificationBellPulse 2.2s ease-out infinite;
}

@keyframes notificationBellPulse {
    0% {
        opacity: 0.75;
        transform: scale(0.96);
    }
    70% {
        opacity: 0;
        transform: scale(1.16);
    }
    100% {
        opacity: 0;
        transform: scale(1.16);
    }
}

.notification-count-pill {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d93025, #ea4335);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(217, 48, 37, 0.35);
    pointer-events: none;
    white-space: nowrap;
}

.notification-menu {
    position: relative;
    width: min(420px, calc(100vw - 20px));
    margin-top: 12px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(218, 226, 238, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.97));
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 60px rgba(17, 40, 74, 0.2);
}

.notification-menu::before {
    content: "";
    position: absolute;
    inset: -80px -40px auto auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(66, 133, 244, 0.16), rgba(66, 133, 244, 0));
    pointer-events: none;
}

.notification-menu__header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 14px;
    background:
        radial-gradient(circle at top left, rgba(26, 115, 232, 0.18), rgba(26, 115, 232, 0) 52%),
        linear-gradient(180deg, rgba(232, 240, 254, 0.7), rgba(255, 255, 255, 0));
    border-bottom: 1px solid rgba(26, 115, 232, 0.08);
}

.notification-menu__intro {
    min-width: 0;
}

.notification-menu__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.08);
}

.notification-menu__eyebrow-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a73e8, #0f9d58);
    color: #ffffff;
    font-size: 0.72rem;
}

.notification-menu__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.notification-menu__title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.notification-menu__live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.notification-menu__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: notificationLivePulse 1.8s ease-in-out infinite;
}

@keyframes notificationLivePulse {
    0%, 100% {
        opacity: 0.6;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.18);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.notification-menu__subtitle {
    margin-top: 6px;
    font-size: 0.79rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.notification-menu__action {
    flex-shrink: 0;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(26, 115, 232, 0.14);
    background: rgba(255, 255, 255, 0.76);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.08);
    transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.notification-menu__action:hover {
    background: #ffffff;
    color: var(--primary);
    transform: translateY(-1px);
}

.notification-menu__metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0 18px 16px;
}

.notification-metric {
    padding: 12px 12px 11px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(26, 115, 232, 0.08);
    box-shadow: 0 12px 22px rgba(26, 41, 64, 0.06);
}

.notification-metric__label {
    display: block;
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1.3;
}

.notification-metric__value {
    display: block;
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.notification-metric--all .notification-metric__value {
    color: var(--primary-dark);
}

.notification-metric--system .notification-metric__value {
    color: #0f766e;
}

.notification-metric--ai .notification-metric__value {
    color: #b46900;
}

.notification-menu__tabs {
    padding: 0 18px 14px;
}

.notification-menu .nav-pills {
    padding: 4px;
    border-radius: 16px;
    background: rgba(232, 240, 254, 0.78);
}

.notification-menu .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 700;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.notification-menu .nav-link.active {
    color: var(--primary-dark);
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(26, 115, 232, 0.12);
}

.notification-menu .nav-link .badge {
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 0.68rem;
    font-weight: 800;
}

.notification-menu__content {
    max-height: 440px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.98));
}

.notification-menu .tab-pane {
    min-height: 294px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 324px;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
}

.notification-list::-webkit-scrollbar {
    width: 8px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(26, 115, 232, 0.18);
    border-radius: 999px;
}

.notification-pane__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid rgba(26, 115, 232, 0.06);
    border-bottom: 1px solid rgba(26, 115, 232, 0.06);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.92));
}

.notification-pane__hint {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.notification-refresh-btn,
.notification-menu__reload,
.notification-empty__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(26, 115, 232, 0.14);
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.notification-refresh-btn:hover,
.notification-menu__reload:hover,
.notification-empty__button:hover {
    background: #ffffff;
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(26, 115, 232, 0.08);
}

.notification-menu__action:disabled,
.notification-refresh-btn:disabled,
.notification-menu__reload:disabled,
.notification-empty__button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.notification-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px 0;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.notification-loading__pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #42a5f5);
    animation: notificationLivePulse 1.8s ease-in-out infinite;
}

.notification-skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
}

.notification-skeleton {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(26, 115, 232, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
}

.notification-skeleton__icon,
.notification-skeleton__line {
    background: linear-gradient(90deg, #edf3fb 20%, #f8fbff 50%, #edf3fb 80%);
    background-size: 200% 100%;
    animation: notificationShimmer 1.3s linear infinite;
}

.notification-skeleton__icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
}

.notification-skeleton__body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    padding-top: 2px;
}

.notification-skeleton__line {
    height: 10px;
    border-radius: 999px;
}

.notification-skeleton__line--title {
    width: 68%;
    height: 12px;
}

.notification-skeleton__line--meta {
    width: 40%;
}

.notification-skeleton__line--message {
    width: 100%;
}

.notification-skeleton__line--message-short {
    width: 78%;
}

@keyframes notificationShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 0;
    padding: 30px 18px;
    border-radius: 20px;
    border: 1px dashed rgba(26, 115, 232, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.95));
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: rgba(26, 115, 232, 0.7);
    background: rgba(232, 240, 254, 0.88);
}

.notification-empty--error {
    border-color: rgba(217, 48, 37, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 247, 0.96));
}

.notification-empty--error i {
    color: rgba(217, 48, 37, 0.82);
    background: rgba(252, 232, 230, 0.92);
}

.notification-empty__title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}

.notification-empty__message {
    max-width: 290px;
    font-size: 0.79rem;
    line-height: 1.5;
}

.notification-card {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start;
    padding: 16px 14px;
    border: 1px solid rgba(26, 115, 232, 0.08);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 255, 0.96));
    box-shadow: 0 12px 24px rgba(26, 41, 64, 0.05);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.notification-card:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(242, 248, 255, 0.96));
    border-color: rgba(26, 115, 232, 0.16);
    box-shadow: 0 18px 30px rgba(26, 115, 232, 0.1);
    transform: translateY(-1px);
}

.notification-card.is-unread {
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.92), rgba(255, 255, 255, 0.98) 32%, rgba(246, 250, 255, 0.96));
    border-color: rgba(26, 115, 232, 0.18);
}

.notification-card.is-unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #1a73e8, #63a4ff);
}

.notification-card.is-pending {
    opacity: 0.68;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.notification-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 12px 18px rgba(26, 41, 64, 0.06);
}

.notification-card__icon--info {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.18), rgba(232, 240, 254, 0.92));
    color: #1a73e8;
}

.notification-card__icon--warning {
    background: linear-gradient(135deg, rgba(242, 153, 0, 0.18), rgba(254, 247, 224, 0.92));
    color: #b46900;
}

.notification-card__icon--danger {
    background: linear-gradient(135deg, rgba(217, 48, 37, 0.16), rgba(252, 232, 230, 0.92));
    color: #c5221f;
}

.notification-card__icon--success {
    background: linear-gradient(135deg, rgba(15, 157, 88, 0.16), rgba(230, 244, 234, 0.92));
    color: #0f9d58;
}

.notification-card__content,
.notification-card__header,
.notification-card__title-row,
.notification-card__meta-row {
    min-width: 0;
}

.notification-card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notification-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.notification-card__status-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #1a73e8;
    box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.12);
}

.notification-card__title {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-card__meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.notification-card__meta-pill,
.notification-card__meta-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.notification-card__meta-pill {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.notification-card__meta-chip {
    background: rgba(232, 240, 254, 0.82);
    color: #275ea9;
}

.notification-card__meta-chip--neutral {
    background: rgba(232, 240, 254, 0.82);
    color: #275ea9;
}

.notification-card__meta-chip--info {
    background: rgba(232, 240, 254, 0.92);
    color: #1a73e8;
}

.notification-card__meta-chip--warning {
    background: rgba(254, 247, 224, 0.96);
    color: #b46900;
}

.notification-card__meta-chip--danger {
    background: rgba(252, 232, 230, 0.96);
    color: #c5221f;
}

.notification-card__meta-chip--success {
    background: rgba(230, 244, 234, 0.96);
    color: #0f9d58;
}

.notification-card__time {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.notification-card__message {
    display: block;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-menu__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(26, 115, 232, 0.08);
    background: rgba(248, 250, 252, 0.9);
}

.notification-menu__footer-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.app-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}

.app-toast {
    position: relative;
    overflow: hidden;
    width: 100%;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: start;
    padding: 16px 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 255, 0.95));
    box-shadow: 0 22px 48px rgba(26, 41, 64, 0.18);
    backdrop-filter: blur(18px);
    pointer-events: auto;
    transform: translateY(-14px) scale(0.98);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease, box-shadow var(--transition-fast);
}

.app-toast::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 5px;
    background: var(--toast-accent, var(--primary));
}

.app-toast::after {
    content: "";
    position: absolute;
    top: -24px;
    right: -32px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--toast-soft, rgba(26, 115, 232, 0.14)), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.app-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.app-toast.is-leaving {
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
}

.app-toast--success {
    --toast-accent: var(--success);
    --toast-soft: rgba(15, 157, 88, 0.18);
}

.app-toast--warning {
    --toast-accent: var(--warning);
    --toast-soft: rgba(242, 153, 0, 0.18);
}

.app-toast--error {
    --toast-accent: var(--danger);
    --toast-soft: rgba(217, 48, 37, 0.18);
}

.app-toast--info {
    --toast-accent: var(--primary);
    --toast-soft: rgba(66, 133, 244, 0.18);
}

.app-toast__icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.app-toast--success .app-toast__icon {
    background: linear-gradient(135deg, rgba(15, 157, 88, 0.18), rgba(230, 244, 234, 0.92));
    color: var(--success);
}

.app-toast--warning .app-toast__icon {
    background: linear-gradient(135deg, rgba(242, 153, 0, 0.18), rgba(254, 247, 224, 0.92));
    color: var(--warning);
}

.app-toast--error .app-toast__icon {
    background: linear-gradient(135deg, rgba(217, 48, 37, 0.18), rgba(252, 232, 230, 0.92));
    color: var(--danger);
}

.app-toast--info .app-toast__icon {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.18), rgba(232, 240, 254, 0.92));
    color: var(--info);
}

.app-toast__body {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.app-toast__eyebrow {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--toast-accent, var(--primary));
}

.app-toast__title {
    margin-top: 2px;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.35;
}

.app-toast__message {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
    word-break: break-word;
}

.app-toast__close {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--text-muted);
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.app-toast__close:hover {
    background: rgba(26, 115, 232, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.app-toast__progress {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 8px;
    height: 4px;
    border-radius: 999px;
    background: rgba(26, 115, 232, 0.08);
    overflow: hidden;
}

.app-toast__progress::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--toast-accent, var(--primary)), rgba(255, 255, 255, 0.88));
    transform-origin: left center;
    animation: appToastProgress var(--toast-duration, 4200ms) linear forwards;
}

.app-toast.is-paused .app-toast__progress::after {
    animation-play-state: paused;
}

@keyframes appToastProgress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

@media (max-width: 575.98px) {
    .notification-menu {
        width: min(calc(100vw - 16px), 420px);
        border-radius: 20px;
    }

    .notification-menu__header,
    .notification-menu__metrics,
    .notification-menu__tabs {
        padding-left: 14px;
        padding-right: 14px;
    }

    .notification-menu__metrics {
        grid-template-columns: 1fr;
    }

    .notification-menu__action {
        min-height: 34px;
        padding: 0 12px;
    }

    .notification-pane__toolbar,
    .notification-menu__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-list {
        max-height: min(52vh, 324px);
        padding: 10px;
    }

    .notification-card {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
        padding: 14px 12px;
    }

    .notification-card__icon {
        width: 42px;
        height: 42px;
    }

    .notification-card__header {
        flex-direction: column;
        gap: 6px;
    }

    .app-toast-container {
        top: 14px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-bell-btn.has-unread::after,
    .notification-menu__live-dot,
    .notification-skeleton__icon,
    .notification-skeleton__line,
    .app-toast__progress::after {
        animation: none;
    }

    .notification-card,
    .notification-menu__action,
    .notification-refresh-btn,
    .notification-menu__reload,
    .notification-empty__button,
    .app-toast,
    .app-toast__close {
        transition: none;
    }
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 6px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 8px;
    background: var(--primary-light);
}

.header-user:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.2);
}

.header-user:hover .user-name,
.header-user:hover .user-role {
    color: #ffffff !important;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: var(--font-size-sm);
}

/* --- AI Assistant & AI Insights --- */
.ai-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1080;
    font-family: var(--font-family);
}

.ai-chat-toggle {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #1a73e8);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.ai-chat-panel {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: min(390px, calc(100vw - 32px));
    height: min(620px, calc(100vh - 110px));
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 22px 55px rgba(26, 41, 64, 0.22);
    display: none;
    overflow: hidden;
}

.ai-chat-widget.is-open .ai-chat-panel {
    display: flex;
    flex-direction: column;
}

.ai-chat-header {
    padding: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #1a73e8);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ai-chat-title {
    font-weight: 800;
    font-size: 1rem;
}

.ai-chat-subtitle {
    font-size: 0.78rem;
    opacity: 0.9;
}

.ai-chat-close {
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-radius: 8px;
    width: 32px;
    height: 32px;
}

.ai-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    scrollbar-width: thin;
}

.ai-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ai-message-user {
    justify-content: flex-end;
}

.ai-message-bubble {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
}

.ai-message-content p {
    margin: 0 0 0.65rem;
}

.ai-message-content p:last-child,
.ai-message-content ul:last-child,
.ai-message-content ol:last-child {
    margin-bottom: 0;
}

.ai-message-content ul,
.ai-message-content ol {
    margin: 0 0 0.65rem;
    padding-left: 1.15rem;
}

.ai-message-content li {
    margin-bottom: 0.35rem;
}

.ai-message-bot .ai-message-bubble {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid #e3e8ef;
}

.ai-message-user .ai-message-bubble {
    background: #1a73e8;
    color: #ffffff;
}

.ai-chat-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    border-top: 1px solid #e3e8ef;
}

.ai-chat-actions button {
    white-space: nowrap;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.ai-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e3e8ef;
    background: #ffffff;
}

.ai-chat-form textarea {
    flex: 1;
    resize: none;
    min-height: 42px;
    max-height: 100px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.88rem;
}

.ai-chat-form button,
.ai-action-btn {
    border: 0;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    min-width: 44px;
    font-weight: 800;
}

.ai-typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 4px;
    border-radius: 50%;
    background: #64748b;
    animation: aiTyping 1s infinite ease-in-out;
}

.ai-typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.ai-typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes aiTyping {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.ai-result-card {
    border: 1px solid #dbe3ec;
    border-left: 4px solid #0f766e;
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
}

.ai-suggestion-item {
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

@media (max-width: 575.98px) {
    .ai-chat-widget {
        right: 16px;
        bottom: 16px;
    }

    .ai-chat-panel {
        width: calc(100vw - 32px);
        height: calc(100vh - 105px);
    }
}

.user-info .user-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-info .user-role {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.2;
}

/* --- PAGE CONTENT --- */
.page-content {
    flex: 1;
    padding: 32px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 6px;
}

.page-breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.page-breadcrumb .separator {
    font-size: 0.75rem;
    color: var(--border-color);
}

/* --- STAT CARDS --- */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(26, 115, 232, 0.12);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.stat-card .stat-icon.blue { background: var(--primary-bg); color: var(--primary); }
.stat-card .stat-icon.teal { background: rgba(0, 120, 212, 0.1); color: var(--primary); }
.stat-card .stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-card .stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-card .stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-card .stat-icon.purple { background: var(--primary-bg); color: #885edb; }

.stat-card .stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
}

.stat-card .stat-change {
    font-size: var(--font-size-xs);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-card .stat-change.up { background: var(--success-bg); color: var(--success); }
.stat-card .stat-change.down { background: var(--danger-bg); color: var(--danger); }

/* --- CONTENT CARDS --- */
.content-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    /* KHÔNG dùng overflow:hidden vì sẽ clip Bootstrap dropdown menu */
    overflow: visible;
    transition: all var(--transition-base);
}

.content-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.card-header-custom {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: transparent;
}

.card-header-custom h5 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-custom h5 i {
    color: #ffffff;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    padding: 6px;
    border-radius: var(--radius-sm);
}

.card-body-custom {
    padding: 28px;
}

/* --- TOOLBAR --- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-search {
    position: relative;
    flex: 1;
    min-width: 0;
}

.toolbar-search input {
    width: 100%;
    height: 40px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 16px 0 40px;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
    background: transparent;
}

.toolbar-search input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(163, 201, 249, 0.2);
    background: #fff;
}

.toolbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.filter-select {
    height: 40px;
    min-width: 160px;
    max-width: 260px;
    width: auto;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 36px 0 16px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 500;
    outline: none;
    background: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(163, 201, 249, 0.2);
}

.btn-primary-custom {
    background: linear-gradient(135deg, #1a73e8, #1557b0);
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.3);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #1557b0, #0d3b7a);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4);
    color: #ffffff;
}

.btn-outline-custom {
    background: #ffffff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8.5px 20px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.08);
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.25);
}

/* --- DATA TABLE --- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--font-size-sm);
}

.data-table thead th {
    background: linear-gradient(135deg, #eef3fb, #f5f8fc);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px 20px;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--primary-light);
}

.data-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* --- BADGES / STATUS --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.active { background: var(--success-bg); color: var(--success); }
.status-badge.inactive { background: var(--danger-bg); color: var(--danger); }
.status-badge.pending { background: var(--warning-bg); color: var(--warning); }
.status-badge.processing { background: var(--primary-bg); color: var(--primary); }
.status-badge.completed { background: var(--success-bg); color: var(--success); }

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* --- PROGRESS BAR --- */
.progress, .progress-custom {
    height: 6px !important;
    background-color: #eeeeee !important;
    border-radius: 10px !important;
    overflow: hidden;
    border: none;
}

.progress-bar, .progress-bar-custom {
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, #4285f4) !important;
    border-radius: 0 !important;
    transition: width 0.6s ease;
}

/* Office Palette Progress Bars */
.bg-soft-success, .progress-bar-custom.green { background: var(--success) !important; box-shadow: none !important; }
.bg-soft-primary { background: var(--primary) !important; box-shadow: none !important; }
.bg-soft-warning, .progress-bar-custom.orange { background: var(--warning) !important; box-shadow: none !important; }
.bg-soft-danger, .progress-bar-custom.red { background: var(--danger) !important; box-shadow: none !important; }

/* --- ACTION BUTTONS IN TABLE --- */
.action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    background: transparent;
    color: var(--text-muted);
}

.action-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.action-btn.danger:hover {
    background: var(--danger);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(164, 38, 44, 0.3);
}

/* --- PAGINATION --- */
.pagination-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-pages .page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination-pages .page-btn:hover,
.pagination-pages .page-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2);
}

/* --- FOOTER --- */
.app-footer {
    padding: 20px 32px;
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    background: transparent;
}

/* --- RESPONSIVE --- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .header-search input { width: 200px; }
    .user-info { display: none; }
}

@media (max-width: 575.98px) {
    .page-content { padding: 20px; }
    .header-search { display: none; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-search input { width: 100%; }
}

/* =========================================
   SIDEBAR COLLAPSED STATE (ICON ONLY)
   ========================================= */

/* Dành cho màn hình máy tính (Desktop) */
@media (min-width: 992px) {
    /* Khi CHƯA có class .sidebar-expanded, thực hiện các hiệu ứng thu gọn */
    html:not(.sidebar-expanded) .sidebar {
        width: 80px;
    }
    html:not(.sidebar-expanded) .main-content {
        margin-left: 80px;
    }

    /* Ẩn chữ Logo, căn giữa Icon Logo */
    html:not(.sidebar-expanded) .sidebar-brand {
        padding: 0;
        justify-content: center;
    }
    html:not(.sidebar-expanded) .brand-icon {
        margin-right: 0;
    }
    html:not(.sidebar-expanded) .brand-info {
        display: none;
    }

    /* Ẩn chữ tiêu đề phân nhóm (Overview, Nhân sự...) */
    html:not(.sidebar-expanded) .sidebar-group-label {
        display: none !important; /* Force hide in collapsed state */
    }

    /* Menu Items: Ẩn chữ, Căn giữa Icon */
    html:not(.sidebar-expanded) .sidebar-link {
        font-size: 0; 
        padding: 12px 0;
        justify-content: center;
        width: auto;
        min-width: 0;
        margin: 4px 10px;
    }
    html:not(.sidebar-expanded) .sidebar-link i {
        font-size: 1.3rem;
        margin-right: 0;
        margin-top: 0;
    }
    
    /* Ẩn mũi tên của menu thả xuống (Submenu) */
    html:not(.sidebar-expanded) .menu-arrow {
        display: none;
    }
    
    /* Xử lý chấm tròn của menu con (Submenu) */
    html:not(.sidebar-expanded) .sidebar-submenu .sidebar-link {
        padding-left: 0;
    }
    html:not(.sidebar-expanded) .sidebar-submenu .sidebar-link::before {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Phần User Footer dưới cùng: Ẩn tên, căn giữa Avatar */
    html:not(.sidebar-expanded) .sidebar-user {
        justify-content: center;
        padding: 15px 0;
    }
    html:not(.sidebar-expanded) .sidebar-user .user-info,
    html:not(.sidebar-expanded) .sidebar-user .bi-three-dots-vertical {
        display: none;
    }
}

/* Dành cho Mobile/Tablet */
@media (max-width: 991.98px) {
    /* Trong mobile view, nếu không có sidebar-expanded thì sidebar ẩn đi (trượt trái) */
    html:not(.sidebar-expanded) .sidebar { transform: translateX(-100%); }
    html:not(.sidebar-expanded) .main-content { margin-left: 0; }
}

/* --- UTILITY --- */
.text-truncate-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fw-semibold { font-weight: 600; }
.text-primary-custom { color: var(--primary) !important; }
.text-success-custom { color: var(--success) !important; }
.text-warning-custom { color: var(--warning) !important; }
.text-danger-custom { color: var(--danger) !important; }

/* --- SIDEBAR FOOTER (USER PROFILE) --- */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
    flex-shrink: 0;
    position: relative; /* Đảm bảo dropdown/dropup neo đúng vị trí */
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar-user:hover {
    background: var(--sidebar-hover);
}

.sidebar-user .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: var(--font-size-md);
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(26, 115, 232, 0.3);
}

.sidebar-user .user-info {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-user .user-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-user .user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.2;
    margin-top: 2px;
}

/* Ẩn thông tin user khi collapse sidebar trên mobile/tablet */
@media (max-width: 991.98px) {
    body.sidebar-collapsed .sidebar-user .user-info,
    body.sidebar-collapsed .sidebar-user .bi-three-dots-vertical {
        display: none;
    }
}

/* --- SOFT MODAL DESIGN --- */
.modal-content {
    border-radius: var(--radius-lg) !important;
    border: none !important;
    box-shadow: 0 15px 50px rgba(45, 53, 89, 0.15) !important;
}

.modal-header-soft {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header-soft.warning {
    background: linear-gradient(135deg, #fef7e0, #fff9ed);
}

.modal-header-soft.primary {
    background: linear-gradient(135deg, #e8f0fe, #f0f5ff);
}

.modal-title-custom {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.modal-title-custom i {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    color: inherit;
}

.modal-body-soft {
    padding: 32px;
}

/* Form Icon Groups */
.form-icon-group {
    position: relative;
    margin-bottom: 24px;
}

.form-icon-group label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    display: block;
}

.form-icon-group .input-wrapper {
    position: relative;
}

.form-icon-group .input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
    opacity: 0.6;
    z-index: 5;
}

.form-icon-group .form-control {
    height: 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    padding-left: 48px;
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    background-color: #fcfdfe;
}

/* Select trong form-icon-group: padding-right đủ chỗ cho mũi tên dropdown */
.form-icon-group .form-select {
    height: 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    padding-left: 48px;
    padding-right: 40px; /* Chừa chỗ cho mũi tên dropdown native */
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
    background-color: #fcfdfe;
    width: 100%; /* Luôn chiếm full width của container */
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-icon-group .form-control:focus,
.form-icon-group .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(163, 201, 249, 0.15);
    background: #fff;
    outline: none;
}

/* Soft Tag for Modal */
.soft-tag-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 28px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.soft-tag-indicator i {
    color: var(--warning);
}

/* Modern Toggle Switch */
.form-switch-premium {
    padding: 16px 20px;
    background-color: #f8fafc;
    border-radius: var(--radius-md);
    border: 1.5px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    transition: all var(--transition-fast);
    cursor: pointer;
    user-select: none;
}

.form-switch-premium:hover {
    border-color: var(--primary-light);
    background-color: #fff;
}

.form-switch-premium .form-check-input {
    width: 3.2rem;
    height: 1.6rem;
    margin-top: 0;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 999px;
    background-position: left center;
    background-size: contain;
    transition: background-position var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(0,0,0,0.25)'/%3e%3c/svg%3e");
}

.form-switch-premium .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    background-position: right center;
}

.form-switch-premium .label-content {
    display: flex;
    flex-direction: column;
}

.form-switch-premium .label-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-switch-premium .label-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- PREMIUM STATUS BADGES (KPI/OKR) --- */
.status-badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.status-badge-soft .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 8px currentColor;
}

/* On Track / Tốt */
.badge-on-track {
    background-color: var(--success-bg);
    color: var(--success);
    border-color: rgba(107, 215, 163, 0.2);
}

/* At Risk / Nguy cơ */
.badge-at-risk {
    background-color: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(251, 199, 162, 0.2);
}

/* Off Track or Late / Trễ */
.badge-late {
    background-color: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(229, 115, 115, 0.2);
}

.badge-on-track:hover { background-color: rgba(107, 215, 163, 0.25); }
.badge-at-risk:hover { background-color: rgba(251, 199, 162, 0.25); }
.badge-late:hover { background-color: rgba(229, 115, 115, 0.25); }

/* ============================================
   CUSTOM BADGE CHO OKR
   ============================================ */
.badge-pastel-pink {
    background-color: var(--primary-light) !important; 
    color: var(--primary) !important; 
    border: 1px solid rgba(26, 115, 232, 0.25) !important; 
}

.badge-pastel-pink:hover {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}

.okr-index-page .okr-status-badge,
.okr-index-page .okr-strategic-badge,
.okr-index-page .okr-kr-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}

.okr-index-page .okr-status-success {
    background-color: #e6f4ea !important;
    color: #0b6f3a !important;
    border-color: rgba(15, 157, 88, 0.28) !important;
}

.okr-index-page .okr-status-primary {
    background-color: #e8f0fe !important;
    color: #1557b0 !important;
    border-color: rgba(26, 115, 232, 0.28) !important;
}

.okr-index-page .okr-status-warning {
    background-color: #fff4d6 !important;
    color: #7a4f00 !important;
    border-color: rgba(242, 153, 0, 0.34) !important;
}

.okr-index-page .okr-status-danger {
    background-color: #fce8e6 !important;
    color: #a50e0e !important;
    border-color: rgba(217, 48, 37, 0.28) !important;
}

.okr-index-page .okr-strategic-badge {
    background-color: #e8f0fe !important;
    color: #1557b0 !important;
    border-color: rgba(26, 115, 232, 0.28) !important;
}

.okr-index-page .okr-strategic-badge i {
    color: #1a73e8 !important;
}

.okr-index-page .okr-meta-text,
.okr-index-page .okr-progress-label {
    color: #4b5a6a !important;
    font-weight: 600;
}

.okr-index-page .okr-kr-status-badge {
    background-color: #e8f0fe !important;
    color: #1557b0 !important;
    border-color: rgba(26, 115, 232, 0.28) !important;
}

.okr-index-page #accordionOKRs .accordion-item {
    position: relative;
    z-index: 1;
}

.okr-index-page #accordionOKRs .accordion-item.okr-dropdown-open {
    z-index: 1080;
}

.okr-index-page .okr-action-dropdown {
    z-index: 2;
}

.okr-index-page .okr-action-dropdown.show {
    z-index: 1085;
}

.okr-index-page .okr-action-dropdown .dropdown-menu {
    z-index: 1086;
}

/* ============================================================
   FIX: Ngăn flickering khi di chuột vào modal (Phân bổ OKR, …)
   Khi body có class modal-open (Bootstrap thêm tự động khi modal mở),
   tắt pointer-events trên accordion-button và các nút action bên dưới
   để backdrop modal có thể chặn sự kiện hover hoàn toàn.
   ============================================================ */
body.modal-open .accordion-button,
body.modal-open .accordion-button:hover,
body.modal-open .accordion-button:focus {
    pointer-events: none !important;
    background-color: white !important;
    box-shadow: none !important;
}

body.modal-open .okr-action-dropdown {
    pointer-events: none !important;
}

body.modal-open .accordion-item {
    pointer-events: none !important;
}

/* Nhưng chính modal thì vẫn hoạt động bình thường */
body.modal-open .modal,
body.modal-open .modal * {
    pointer-events: auto !important;
}

/* Ép z-index dropdown OKR xuống dưới modal-backdrop (1040)
   để dropdown không bao giờ đè lên modal — lớp bảo vệ thứ 2 */
body.modal-open .okr-action-dropdown,
body.modal-open .okr-action-dropdown .dropdown-menu,
body.modal-open .okr-index-page .okr-action-dropdown.show,
body.modal-open .okr-index-page .okr-action-dropdown .dropdown-menu {
    z-index: 1 !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* --- GLOBAL: REMOVE ALL TEXT UNDERLINES --- */
* {
    text-decoration: none !important;
}

a, a:hover, a:focus, a:active {
    text-decoration: none !important;
}

/* ============================================================
   GLOBAL SELECT FIX - Sửa lỗi <select> vỡ khung / đè nội dung
   Áp dụng cho: OKR, KPI, MissionVisions và toàn bộ hệ thống
   ============================================================ */

/* 1. Base: Tất cả select - đảm bảo không bị vỡ layout */
.form-select {
    display: block;
    box-sizing: border-box;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 2. Select trong toolbar (w-auto) - đặt min/max width rõ ràng */
.toolbar .form-select,
.toolbar-left .form-select,
select.form-select.w-auto {
    width: auto !important;
    min-width: 150px;
    max-width: 280px;
    flex-shrink: 0;
}

/* 3. Select trong grid Bootstrap (col-md-*) - luôn full width */
[class*="col-"] > .form-select,
[class*="col-"] > label + .form-select {
    width: 100% !important;
    max-width: 100%;
}

/* 4. Select trong form-icon-group (có icon bên trái) - PRIORITY CAO */
/* Phải đặt sau các rule khác và dùng !important để override */
.form-icon-group .input-wrapper .form-select,
.form-icon-group .form-select {
    padding-left: 48px !important;   /* Chừa chỗ cho icon trái */
    padding-right: 2.5rem !important; /* Chừa chỗ cho mũi tên dropdown native */
    height: 44px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 5. Responsive: Trên mobile, tất cả select full-width */
@media (max-width: 575.98px) {
    .toolbar .form-select,
    .toolbar-left .form-select,
    .filter-select {
        width: 100% !important;
        min-width: unset;
        max-width: 100%;
    }
}


/* ============================================================
   SELECT2 OFFICE-STYLE THEME
   Customized for Professional Blue Enterprise Theme
   ============================================================ */

/* 1. Base Container */
.select2-container--default .select2-selection--single {
    height: 44px !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    background-color: #fcfdfe !important;
    display: flex;
    align-items: center;
    transition: all var(--transition-fast) !important;
    outline: none !important;
}

/* 2. Selection Text & Icon Handling */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    font-size: var(--font-size-sm) !important; /* Slightly smaller font for sleek look */
    padding-left: 16px !important;
    padding-right: 40px !important;
    line-height: normal !important;
    display: flex;
    align-items: center;
}

/* Fix for form-icon-group: If Select2 is inside an input-wrapper, we need to respect the left icon */
.form-icon-group .input-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 48px !important; /* Matches .form-control padding-left */
}

/* 3. Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

/* 4. Arrow / Caret */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    right: 12px !important;
    width: 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--primary) transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
    margin-left: -5px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--primary) transparent !important;
    border-width: 0 5px 6px 5px !important;
}

/* 5. Focus & Open State */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 4px rgba(163, 201, 249, 0.15) !important;
    background-color: #fff !important;
}

/* 6. Dropdown Menu (Results) */
.select2-container--open .select2-dropdown {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden;
    z-index: 9999;
    animation: select2FadeIn 0.2s ease-out;
}

@keyframes select2FadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.select2-container--default .select2-search--dropdown {
    padding: 12px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    font-size: var(--font-size-sm) !important;
    outline: none !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary) !important;
}

.select2-results__options {
    max-height: 300px !important;
    scrollbar-width: thin;
}

.select2-results__option {
    padding: 10px 16px !important;
    font-size: var(--font-size-sm) !important;
    color: var(--text-secondary) !important;
    transition: all 0.1s ease !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary-bg) !important;
    color: var(--primary) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
    font-weight: 700 !important;
}

/* 7. Multi-select styling (if needed) */
.select2-container--default .select2-selection--multiple {
    min-height: 44px !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 2px 8px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--primary-bg) !important;
    border: 1px solid var(--primary-light) !important;
    color: var(--primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 2px 10px !important;
    font-weight: 600 !important;
    margin-top: 6px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--primary) !important;
    margin-right: 6px !important;
}

/* 8. Fix for Select2 in Toolbar */
.toolbar .select2-container, .toolbar-left .select2-container {
    min-width: 220px !important; /* Longer horizontally */
}

.toolbar .select2-container--default .select2-selection--single {
    height: 40px !important; /* Smaller in toolbar */
}

.toolbar .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

/* 9. Fixed width for shared page filter selects */
.page-filter-select {
    width: 320px !important;
    min-width: 320px;
    max-width: 320px;
}

.page-filter-select + .select2-container {
    width: 320px !important;
    min-width: 320px;
    max-width: 320px;
}

.page-filter-select + .select2-container .select2-selection--single .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .page-filter-select,
    .page-filter-select + .select2-container {
        width: 100% !important;
        min-width: 0;
        max-width: 100%;
    }
}
