:root {
    --primary: #0891b2;
    --primary-hover: #0e7490;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --accent: #38bdf8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 280px;
    --glass: rgba(30, 41, 59, 0.7);
    --scrollbar-track: rgba(15, 23, 42, 0.3);
    --scrollbar-thumb: rgba(100, 116, 139, 0.5);
    --scrollbar-thumb-hover: rgba(100, 116, 139, 0.7);
}

body.light-mode {
    --bg-dark: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --glass: rgba(255, 255, 255, 0.8);
    --scrollbar-track: #e2e8f0;
    --scrollbar-thumb: #94a3b8;
    --scrollbar-thumb-hover: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Admin Mode Logic */
.admin-only {
    display: none !important;
}

body.admin-mode .admin-only {
    display: inherit !important;
    /* Restores default display (block/flex/table-cell) */
}

/* User Mode Logic (limited permissions: skill levels + add employee) */
.user-only {
    display: none !important;
}

body.user-mode .user-only,
body.admin-mode .user-only {
    display: inherit !important;
}

/* Specific fix for flex containers */
body.admin-mode div.admin-only,
body.admin-mode button.admin-only {
    display: flex !important;
}

body.user-mode div.user-only,
body.user-mode button.user-only,
body.admin-mode div.user-only,
body.admin-mode button.user-only {
    display: flex !important;
}

body.admin-mode td.admin-only,
body.admin-mode th.admin-only {
    display: table-cell !important;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.brand i {
    color: var(--primary);
}

.search-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-wrapper input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 0.5rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

.search-wrapper input:focus {
    border-color: var(--primary);
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
}

.nav-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.nav-menu ul {
    list-style: none;
}

.nav-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--accent);
}

.nav-item.active {
    border-left: 3px solid var(--primary);
}

.user-profile {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info .name {
    font-weight: 500;
    font-size: 0.9rem;
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.top-bar {
    height: 70px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    backdrop-filter: blur(10px);
    background: var(--glass);
}

.breadcrumbs {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
}

.content-area {
    flex: 1;
    overflow: auto;
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Data Table */
.table-container {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table th {
    background-color: rgba(15, 23, 42, 0.5);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: sticky;
    top: 0;
}

.data-table td {
    color: var(--text-main);
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.skill-cell {
    text-align: center;
}

.skill-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.skill-high {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.skill-med {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.skill-low {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.skill-none {
    color: var(--border);
}

/* Animation */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Suggestions Box */
.suggestions-box {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    width: 300px;
    /* Width of search bar roughly */
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: rgba(79, 70, 229, 0.1);
}

.suggestion-name {
    font-weight: 500;
    color: var(--text-main);
}

.suggestion-epf {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Modal Styles update */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal h3 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: 0.5rem;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
}

.modal-input:focus {
    border-color: var(--primary);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.modal-btn:active {
    transform: scale(0.98);
}

.modal-btn-primary {
    background: var(--primary);
    color: white;
}

.modal-btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.active {
        left: 0;
    }

    /* Mobile Header Fixes */
    .top-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
        gap: 10px;
    }

    .breadcrumbs {
        font-size: 0.9rem;
        order: 1;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .actions {
        order: 2;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .actions .toggle-wrapper {
        font-size: 0.8rem;
        padding: 4px 8px !important;
    }

    .actions .btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .actions .btn i {
        font-size: 0.8rem;
    }

    /* Hide text on buttons, show only icons on very small screens */
    @media (max-width: 480px) {
        .actions .btn {
            padding: 8px;
        }

        .actions .btn span,
        .actions .btn a {
            display: none;
        }
    }

    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 15px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    /* Table Mobile */
    .content-area {
        padding: 10px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

/* Context Menu Styles */
.context-menu {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    min-width: 160px;
    display: none;
    overflow: hidden;
}

.context-menu.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: rgba(79, 70, 229, 0.2);
}

.context-menu-item i {
    width: 16px;
    color: var(--primary);
}

.context-menu-danger {
    color: #ef4444;
}

.context-menu-danger i {
    color: #ef4444;
}

.context-menu-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Skill Progress Bar with Bubble Animation */
.skill-progress-bar {
    position: relative;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-progress-fill {
    height: 100%;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: width 1s ease-out;
    animation: fillPulse 2s ease-in-out infinite;
}

.skill-progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Bubble Animation Container */
.bubble-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: bubbleRise 2s ease-in infinite;
}

.bubble:nth-child(1) {
    left: 20%;
    width: 8px;
    height: 8px;
    animation-delay: 0s;
    animation-duration: 2s;
}

.bubble:nth-child(2) {
    left: 50%;
    width: 6px;
    height: 6px;
    animation-delay: 0.5s;
    animation-duration: 2.5s;
}

.bubble:nth-child(3) {
    left: 75%;
    width: 10px;
    height: 10px;
    animation-delay: 1s;
    animation-duration: 1.8s;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-30px) scale(0.5);
        opacity: 0;
    }
}

@keyframes fillPulse {

    0%,
    100% {
        box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
}

/* Wave overlay effect */
.skill-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
    animation: waveShine 2s linear infinite;
}

@keyframes waveShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease-out forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.toast.hiding {
    opacity: 0;
    transform: translateX(20px);
}

.toast i {
    font-size: 1.2rem;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-success i {
    color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-error i {
    color: var(--danger);
}

.toast-info {
    border-left-color: var(--accent);
}

.toast-info i {
    color: var(--accent);
}

.toast-message {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Light Mode Variables */
[data-theme="light"] {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --accent: #0ea5e9;
    --glass: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .data-table th {
    background-color: #f1f5f9;
}

[data-theme="light"] .data-table tbody tr:hover {
    background-color: #f8fafc;
}

[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active {
    background-color: #eef2ff;
}

[data-theme="light"] .modal-input,
[data-theme="light"] .search-wrapper input {
    background: #f8fafc;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Login Overlay Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-overlay.hidden {
    display: none;
}

.login-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

[data-theme="light"] .login-overlay {
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 50%, #e2e8f0 100%);
}

/* Right Side Navigation Pane (Auto-Hide) */
.right-pane {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.right-pane.active {
    right: 0;
}

.right-pane-toggle {
    position: absolute;
    left: -48px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    box-shadow: -3px 0 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.right-pane-toggle:hover {
    width: 56px;
    left: -56px;
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
}

.right-pane-toggle i {
    transition: transform 0.3s ease;
}

.right-pane.active .right-pane-toggle i {
    transform: rotate(180deg);
}

.right-pane-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.right-pane-header h4 {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-pane-header h4 i {
    color: var(--primary);
}

.right-pane-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.right-pane-close:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.designation-filter-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.designation-filter-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.designation-filter-item:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary);
    transform: translateX(-3px);
}

.designation-filter-item.active {
    background: rgba(79, 70, 229, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.3);
}

.designation-filter-item .designation-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.designation-filter-item .designation-info {
    flex: 1;
}

.designation-filter-item .designation-name {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

.designation-filter-item .designation-count {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 2px;
}

.designation-filter-item .check-icon {
    color: var(--success);
    opacity: 0;
    transition: opacity 0.2s;
}

.designation-filter-item.active .check-icon {
    opacity: 1;
}

.designation-filter-actions {
    padding: 15px;
    border-top: 1px solid var(--border);
}

/* Light mode adjustments for right pane */
[data-theme="light"] .right-pane {
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .right-pane-header {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .designation-filter-item {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .designation-filter-item:hover {
    background: rgba(79, 70, 229, 0.05);
}

/* Mobile responsiveness for right pane */
@media (max-width: 768px) {
    .right-pane {
        width: 280px;
        right: -280px;
    }

    .right-pane-toggle {
        left: -40px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .right-pane-toggle:hover {
        width: 44px;
        left: -44px;
    }
}

/* Selected Filter Chips (Multi-select display) */
.selected-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.selected-filter-chip:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.selected-filter-chip .chip-remove {
    font-size: 0.7rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.selected-filter-chip:hover .chip-remove {
    opacity: 1;
}

/* Light mode chip styles */
[data-theme="light"] .selected-filter-chip {
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

[data-theme="light"] .selected-filter-chip:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Audit Log Modal Styles */
.audit-tabs {
    display: flex;
    gap: 10px;
    padding: 15px 20px 0;
    border-bottom: 1px solid var(--border);
}

.audit-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
}

.audit-tab:hover {
    color: var(--text);
    background: rgba(99, 102, 241, 0.1);
}

.audit-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.audit-filters {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    flex-wrap: wrap;
    align-items: center;
}

.audit-filter-select {
    padding: 8px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    min-width: 140px;
}

.audit-filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.audit-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 10px 20px;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.audit-table th,
.audit-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.audit-table th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-muted);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.audit-table tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.audit-action-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.audit-action-badge.add {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.audit-action-badge.edit,
.audit-action-badge.skill_update {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.audit-action-badge.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.audit-action-badge.toggle_status {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.audit-action-badge.restore,
.audit-action-badge.revert {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.audit-user-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.audit-user-badge.admin {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.audit-user-badge.ie {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.audit-user-badge.apm {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.audit-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.audit-btn-revert {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.audit-btn-revert:hover {
    background: rgba(139, 92, 246, 0.4);
}

.audit-btn-restore {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.audit-btn-restore:hover {
    background: rgba(16, 185, 129, 0.4);
}

.audit-btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.audit-btn-delete:hover {
    background: rgba(239, 68, 68, 0.4);
}

.audit-details {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.audit-details strong {
    color: var(--text);
}

.audit-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
}

.audit-pagination button {
    padding: 8px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.audit-pagination button:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
}

.audit-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.audit-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.audit-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Audit Left Pane (Sliding Panel) */
.audit-pane {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 380px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.audit-pane.active {
    transform: translateX(0);
}

.audit-pane-toggle {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 0 12px 12px 0;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.audit-pane-toggle:hover {
    width: 60px;
    right: -60px;
}

.audit-pane-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.audit-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.audit-pane-header h4 {
    color: var(--text);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audit-pane-header h4 i {
    color: var(--primary);
}

.audit-pane-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.audit-pane-close:hover {
    color: var(--text);
}

.audit-pane-tabs {
    display: flex;
    padding: 0 15px;
    border-bottom: 1px solid var(--border);
}

.audit-pane-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.audit-pane-tab:hover {
    color: var(--text);
}

.audit-pane-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.audit-pane-filters {
    display: flex;
    gap: 8px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
}

.audit-pane-select {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.8rem;
}

.audit-pane-select:focus {
    outline: none;
    border-color: var(--primary);
}

.audit-pane-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
}

/* Audit Item Card */
.audit-item {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s;
}

.audit-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    background: rgba(30, 41, 59, 0.9);
}

.audit-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.audit-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.audit-item-icon.add {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.audit-item-icon.edit,
.audit-item-icon.skill_update {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.audit-item-icon.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.audit-item-icon.restore,
.audit-item-icon.revert {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.audit-item-icon.toggle_status {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.audit-item-info {
    flex: 1;
}

.audit-item-title {
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

.audit-item-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.audit-item-details {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.audit-item-details strong {
    color: var(--text);
}

.audit-item-actions {
    display: flex;
    gap: 8px;
}

.audit-item-actions .audit-btn {
    flex: 1;
    justify-content: center;
}

/* Recycle Item Card */
.recycle-item {
    background: var(--bg);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-left: 3px solid #ef4444;
}

.recycle-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.recycle-item-icon {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-weight: 600;
}

.recycle-item-info {
    flex: 1;
}

.recycle-item-name {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.recycle-item-epf {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.recycle-item-details {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.recycle-item-actions {
    display: flex;
    gap: 8px;
}

.recycle-item-actions .audit-btn {
    flex: 1;
    justify-content: center;
    padding: 8px;
}

.audit-pane-pagination {
    padding: 10px 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--border);
}

.audit-pane-pagination button {
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.8rem;
    cursor: pointer;
}

.audit-pane-pagination button:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.audit-pane-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.audit-pane-actions {
    padding: 15px;
    border-top: 1px solid var(--border);
}

.audit-pane-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.audit-pane-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Skill Breakdown Row Styles */
.skill-breakdown-row {
    transition: all 0.3s ease;
}

.skill-breakdown-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--border);
}

.skill-breakdown-content {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effect for clickable progress bars */
td:has(.skill-progress-bar):hover .skill-progress-bar {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Dark mode scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.5) rgba(15, 23, 42, 0.3);
}

/* Webkit browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Audit modal specific scrollbar */
.modal-overlay .modal *::-webkit-scrollbar {
    width: 6px;
}

.modal-overlay .modal *::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

.modal-overlay .modal *::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
}