:root {
    --primary-color: #891bb8;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --light-gray: #f8f9fa;
    --medium-gray: #e0e0e0;
    --dark-gray: #7f8c8d;
    --white: #ffffff;
    --black: #000000;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

.is-hidden {
    display: none !important;
}

.portal-label-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.portal-label-status {
    min-height: 22px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

.portal-label-status.is-error {
    color: var(--danger-color);
}

.portal-label-status.is-success {
    color: var(--success-color);
}

.portal-label-table-wrap {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
}

.portal-label-table {
    margin-bottom: 0;
}

.portal-label-table th {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--medium-gray);
    white-space: nowrap;
}

.portal-label-table td {
    vertical-align: middle;
}

.portal-label-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-label-edit-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 260px;
}

.portal-label-edit-row input {
    min-width: 180px;
}

.portal-label-default {
    color: var(--medium-gray);
    font-size: 12px;
}

.portal-label-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(4px);
}

.portal-label-confirm-modal {
    width: min(440px, 100%);
    border: 1px solid rgba(137, 27, 184, 0.18);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    padding: 24px;
}

.portal-label-confirm-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 14px;
    color: var(--primary-color);
    background: rgba(137, 27, 184, 0.1);
}

.portal-label-confirm-icon.is-danger {
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.14);
}

.portal-label-confirm-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--dark-color);
}

.portal-label-confirm-content p {
    margin: 0;
    color: var(--medium-gray);
    line-height: 1.55;
}

.portal-label-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

:root {
    /* Purple Theme */
    --primary-color: #891bb8;
    --primary-light: #a855f7;
    --primary-dark: #6b21a8;
    --primary-gradient: linear-gradient(135deg, #891bb8 0%, #a855f7 100%);
    
    /* Secondary Colors */
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    
    /* Neutral Colors */
    --dark-color: #1f2937;
    --dark-gray: #374151;
    --medium-gray: #6b7280;
    --light-gray: #f3f4f6;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --black: #111827;
    
    /* UI Colors */
    --sidebar-bg: #1f2937;
    --header-bg: var(--white);
    --card-bg: var(--white);
    --border-color: #e5e7eb;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-color);
    overflow-x: hidden;
}

.manager-only {
    display: none;
}

.is-manager .manager-only {
    display: block;
}

.is-manager .sidebar .manager-only {
    display: block;
}

.is-manager .manager-only.content-section {
    display: none;
}

.is-manager .manager-only.content-section.active {
    display: block;
}

.employee-only {
    display: none;
}

.is-employee .employee-only {
    display: block;
}

.is-employee .sidebar .employee-only {
    display: block;
}

.is-employee .employee-only.content-section {
    display: none;
}

.is-employee .employee-only.content-section.active {
    display: block;
}

.admin-only {
    display: none;
}

.is-admin .admin-only {
    display: block;
}

.is-admin .sidebar .admin-only {
    display: block;
}

.is-admin .admin-only.content-section {
    display: none;
}

.is-admin .admin-only.content-section.active {
    display: block;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
    box-shadow: var(--shadow-lg);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar.collapsed {
    width: 72px;
    transform: translateX(0);
}

.sidebar.collapsed .logo {
    justify-content: center;
    padding: 1.25rem 0.5rem;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .user-info,
.sidebar.collapsed .logout-btn {
    display: none;
}

.sidebar.collapsed .user-profile {
    padding: 1rem 0.5rem;
    justify-content: center;
}

.sidebar.collapsed .user-avatar {
    margin: 0 auto;
}

.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.sidebar.collapsed .nav-submenu {
    display: none;
}

.sidebar.collapsed .nav-item a::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    background: rgba(17, 24, 39, 0.95);
    color: #f9fafb;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.sidebar.collapsed .nav-item a:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Logo */
.sidebar .logo {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: visible;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.logo-icon.has-system-logo {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.logo-icon.has-system-logo i {
    opacity: 0;
}

.logo-text h2 {
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.sidebar-collapse {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #f9fafb;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
   
    right: 12px;
    top: 10%;
    transform: translateY(-50%);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.35);
    z-index: 5;
}

.sidebar-collapse:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-50%) translateX(2px);
}

.sidebar.collapsed .sidebar-collapse {
    right: -12px;
}

/* Sidebar Search */
.sidebar-search {
    padding: 1rem 1.5rem;
    position: relative;
}

.sidebar-search i {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.sidebar-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: white;
    font-size: 0.875rem;
    transition: var(--transition);
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-group-label {
    margin: 1rem 1rem 0.35rem;
    color: rgba(203, 213, 225, 0.78);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.nav-group-label[hidden] {
    display: none !important;
}

.nav-item.sidebar-search-hidden {
    display: none !important;
}

.sidebar-nav-empty {
    margin: 0.5rem 1.25rem;
    padding: 0.7rem 0.8rem;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.sidebar-nav-empty[hidden] {
    display: none !important;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    
    transition: var(--transition);
   
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active a {
    background: rgba(137, 27, 184, 0.2);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.nav-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-right: 0.75rem;
    transition: var(--transition);
}

.nav-item.active .nav-icon {
    background: var(--primary-gradient);
}

.nav-text {
    flex: 1;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
}

.badge-new {
    background: var(--danger-color);
    animation: pulse 2s infinite;
}

.nav-arrow {
    font-size: 0.75rem;
    transition: var(--transition);
}

.nav-item.expanded .nav-arrow {
    transform: rotate(90deg);
}

/* Submenu */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    padding-left: 3rem;
}

.nav-item.expanded .nav-submenu {
    max-height: 500px;
}

.nav-submenu li {
    margin: 0.25rem 0;
}

.nav-submenu a {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

.nav-submenu a:hover {
    opacity: 1;
}

/* User Profile */

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content.expanded {
    margin-left: 72px;
}

/* Header */
.main-header {
    background: var(--header-bg);
    padding: 0.55rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 58px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.main-header.is-hidden {
    display: none;
}

.main-header.dashboard-header {
    min-height: 48px;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    box-shadow: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

.dashboard-header-welcome {
    display: none;
}

.main-header.dashboard-header .header-left {
    display: flex;
}

.main-header.dashboard-header #page-title,
.main-header.dashboard-header #main-breadcrumb {
    display: none;
}

.main-header.dashboard-header .dashboard-header-welcome {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    max-width: min(520px, 100%);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-header-welcome-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    font-size: 0.76rem;
}

.dashboard-header-welcome h1 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.dashboard-header-welcome p {
    margin: 0.15rem 0 0;
    color: var(--medium-gray);
    font-size: 0.76rem;
    line-height: 1.3;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.header-left h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    line-height: 1.2;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.breadcrumb i {
    font-size: 0.75rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Notification */
.notification-dropdown {
    position: relative;
}

.header-action-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    background: var(--light-gray);
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.header-action-btn:hover {
    background: var(--primary-light);
    color: white;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-full);
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 320px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.notification-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-header h4 {
    font-size: 1rem;
    font-weight: 600;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.mark-all-read:hover {
    color: var(--primary-dark);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    outline: none;
}

.btn i {
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(137, 27, 184, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(137, 27, 184, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.main-header .btn {
    min-height: 34px;
    padding: 0.42rem 0.8rem;
    font-size: 0.76rem;
    line-height: 1;
    border-radius: 0.6rem;
}

.main-header .btn i {
    font-size: 0.78rem;
    margin-right: 0;
}

.main-header .finance-portal-switch,
.main-header .pay-portal-switch {
    padding: 0.42rem 0.8rem;
}

.main-header .user-profile-dropdown {
    margin-right: 0.15rem;
}

.main-header .user-profile-display {
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
}

.main-header .user-avatar-small {
    width: 28px;
    height: 28px;
    margin-right: 0.45rem;
    border-width: 1px;
}

.main-header .user-info-small {
    margin-right: 0.35rem;
}

.main-header #header-user-name {
    font-size: 0.76rem;
}

.main-header .user-role-small {
    font-size: 0.66rem;
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.main-content.section-layout-mode .content-wrapper {
    padding: 1.25rem 1.5rem 2rem;
}

.section-context-bar {
    display: none;
    margin: 0 0 1.25rem;
    padding: 0.25rem 0 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.section-context-bar.active {
    display: block;
}

.section-context-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
    letter-spacing: -0.01em;
}

.section-context-bar .breadcrumb-nav {
    margin-top: 0.4rem;
}

.section-context-bar .breadcrumb-item {
    color: #64748b;
    font-size: 1rem;
}

.section-context-bar .breadcrumb-item:hover {
    color: #891bb8;
}

.section-context-bar .breadcrumb-item.is-current {
    color: #891bb8;
    font-weight: 600;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.header-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-content p {
    color: var(--medium-gray);
    margin-top: 0.5rem;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.date-filter select {
    border: none;
    background: none;
    color: var(--dark-gray);
    font-size: 0.875rem;
    outline: none;
}

/* 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(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.primary::before { background: var(--primary-color); }
.stat-card.success::before { background: var(--success-color); }
.stat-card.warning::before { background: var(--warning-color); }
.stat-card.danger::before { background: var(--danger-color); }

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.stat-card.primary .stat-icon { background: rgba(137, 27, 184, 0.1); color: var(--primary-color); }
.stat-card.success .stat-icon { background: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.1); color: var(--warning-color); }
.stat-card.danger .stat-icon { background: rgba(239, 68, 68, 0.1); color: var(--danger-color); }

.stat-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-trend {
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-trend.up { color: var(--success-color); }
.stat-trend.down { color: var(--danger-color); }

/* Dashboard Grid */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Chart Container */
.chart-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.legend-item {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
    margin-right: 0.25rem;
}

.legend-item.approved { background: var(--success-color); }
.legend-item.pending { background: var(--warning-color); }
.legend-item.rejected { background: var(--danger-color); }

.chart-placeholder {
    height: 300px;
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: var(--radius);
}

.chart-bar {
    flex: 1;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    animation: chartGrow 1s ease-out;
}

@keyframes chartGrow {
    from { height: 0; }
    to { height: var(--target-height); }
}

/* Recent Activity */
.recent-activity {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.activity-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.view-all {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light-bg);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-gray);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--dark-color);
}

.data-table tr:hover {
    background: var(--light-bg);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(137, 27, 184, 0.1);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--medium-gray);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 72px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
    }
    
    .main-content {
        margin-left: 0;
    }

    .main-content.expanded {
        margin-left: 0;
    }
    
    .sidebar-collapse {
        display: inline-flex;
    }

    .sidebar.collapsed {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .main-header {
        padding: 0.65rem 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .header-left {
        width: 100%;
    }
    
    .header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions {
        justify-content: flex-start;
    }
    
    .content-wrapper {
        padding: 1rem;
    }

    .main-content.section-layout-mode .content-wrapper {
        padding: 1rem;
    }

    .section-context-title {
        font-size: 1.6rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-context-title {
        font-size: 1.35rem;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }

.bg-primary { background: var(--primary-color); }
.bg-success { background: var(--success-color); }
.bg-warning { background: var(--warning-color); }
.bg-danger { background: var(--danger-color); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

.fade-in { animation: fadeIn 0.3s ease; }
.slide-in-right { animation: slideInRight 0.3s ease; }
.slide-in-left { animation: slideInLeft 0.3s ease; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-color);
    line-height: 1.6;
}
/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: var(--white);
    padding: 0px 0;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    padding: 0 20px 20px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    
}

nav ul {
    list-style: none;
    flex-grow: 1;
}

nav li {
    margin-bottom: 5px;
}

nav a {
    display: block;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

nav a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

nav li.active a {
    background-color: var(--primary-color);
}

.user-profile {
    padding: 20px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: bold;
}

.role {
    font-size: 0.8rem;
    opacity: 0.8;
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--white);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    z-index: 10;
}

.header-title h1 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

.content-wrapper {
    padding: 5px;
    flex-grow: 1;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 1px;
}

.section-header h2 {
    color: var(--dark-color);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.section-header h2 i {
    margin-right: 10px;
}

.section-header p {
    color: var(--gray-color);
}

/* Buttons */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
   /* color:  #f8d7da; */
}

.btn-outline:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-action {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-action:hover {
    color: var(--primary-color);
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--border-radius);
    width: 800px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.modal-tabs {
    display: flex;
    position: absolute;
    left: 20px;
    bottom: -1px;
}

.modal-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-color);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    margin-right: 5px;
    background-color: var(--white);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.modal-tab:hover {
    color: var(--dark-color);
}

.modal-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.modal-tab-content {
    display: none;
    padding: 20px;
}

.modal-tab-content.active {
    display: block;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


/* Context Menu */
.context-menu {
    position: absolute;
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.context-menu-item:hover {
    background-color: var(--light-gray);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .processing-container {
        flex-direction: column;
    }
    
    .document-viewer-container,
    .form-section {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px;
    }
    
    .logo {
        padding: 10px;
    }
    
    nav ul {
        display: flex;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    nav li {
        margin-bottom: 0;
        margin-right: 5px;
    }
    
    nav a {
        white-space: nowrap;
    }
    
    .user-profile {
        display: none;
    }
    
    .content-wrapper {
        padding: 1px;
    }
    
    .invoice-detail-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .modal-tabs {
        position: static;
        margin-bottom: 15px;
    }
    
    #modal-pdf-viewer {
        height: 50vh;
    }
}

/* Advanced collapsed navigation rail */
:root {
    --sidebar-collapsed-width: 88px;
}

.sidebar {
    background:
        linear-gradient(180deg, #1e293b 0%, #111827 48%, #0f172a 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

.sidebar-collapse {
    position: absolute;
    right: 14px;
    top: 42px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #e2e8f0;
    font-size: 0.78rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.34);
}

.sidebar-collapse:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-50%) translateX(2px);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    overflow: visible;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .logo {
    min-height: 84px;
    padding: 1rem 0.8rem;
    justify-content: center;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sidebar.collapsed .logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.32);
}

.sidebar.collapsed .sidebar-collapse {
    right: -15px;
    top: 42px;
    background: #334155;
    border-color: rgba(226, 232, 240, 0.34);
}

.sidebar.collapsed .sidebar-nav {
    padding: 1rem 0.65rem;
    overflow-x: visible;
}

.sidebar.collapsed .sidebar-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.sidebar.collapsed .nav-item {
    width: 100%;
    margin: 0;
    position: relative;
}

.sidebar.collapsed .nav-group-label {
    display: none !important;
}

.sidebar.collapsed .nav-item a {
    position: relative;
    width: 56px;
    height: 50px;
    margin: 0 auto;
    padding: 0;
    justify-content: center;
    border-radius: 16px;
    border-left: 0;
    color: #cbd5e1;
    background: transparent;
}

.sidebar.collapsed .nav-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar.collapsed .nav-item.active a {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-left: 0;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.sidebar.collapsed .nav-item.active a::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    width: 4px;
    height: 26px;
    border-radius: 999px;
    background: #60a5fa;
    transform: translateY(-50%);
    box-shadow: 0 0 18px rgba(96, 165, 250, 0.8);
}

.sidebar.collapsed .nav-icon {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
}

.sidebar.collapsed .nav-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.18);
}

.sidebar.collapsed .nav-item a::after {
    left: calc(100% + 14px);
    z-index: 2500;
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.sidebar.collapsed .nav-item a:hover::after,
.sidebar.collapsed .nav-item a:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.sidebar.collapsed .nav-item a .nav-badge#review-nav-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    align-items: center;
    justify-content: center;
    border: 2px solid #1e293b;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.32);
}

.sidebar.collapsed .user-profile {
    margin: 0.75rem auto 1rem;
    width: 58px;
    min-height: 64px;
    padding: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar.collapsed .user-avatar {
    width: 44px;
    height: 44px;
    margin: 0;
}

.sidebar.collapsed .user-avatar img {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.sidebar.collapsed .user-status {
    right: 2px;
    bottom: 2px;
    border-color: #1e293b;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .user-info,
.sidebar.collapsed .logout-btn,
.sidebar.collapsed .report-admin-badge {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar.collapsed + .main-content,
    .main-content.expanded {
        margin-left: var(--sidebar-collapsed-width);
    }
}

@media (max-width: 768px) {
    .sidebar.collapsed + .main-content,
    .main-content.expanded {
        margin-left: 0;
    }
}

/* Sidebar scroll UX: no horizontal page scroll, vertical rail appears only while scrolling. */
.sidebar,
.sidebar.collapsed {
    overflow: hidden;
}

.sidebar-nav,
.sidebar.collapsed .sidebar-nav {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scrollbar-color: transparent transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
}

.sidebar.collapsed .sidebar-nav ul {
    max-width: 100%;
}

.access-management-actions {
    position: sticky;
    top: 12px;
    z-index: 5;
}

.access-management-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0;
}

.access-permission-search {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.access-permission-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.access-permission-search input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    padding: 8px 12px 8px 36px;
    font-size: 13px;
}

.access-management-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.access-module-row {
    background: #f8fafc;
}

.access-module-row td {
    border-top: 1px solid #dbe3ef;
    border-bottom: 1px solid #dbe3ef;
}

.access-module-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-weight: 700;
    padding: 4px 0;
}

.access-module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef2ff;
    color: #6d28d9;
}

.access-module-count {
    display: inline-flex;
    align-items: center;
    min-width: 42px;
    justify-content: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    padding: 3px 8px;
}

.access-module-row.is-module-disabled .access-module-count {
    background: #e5e7eb;
    color: #6b7280;
}

.access-module-enable-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    font-weight: 700;
    color: #334155;
}

.access-module-summary {
    color: #64748b;
    font-size: 12px;
}

.access-section-name {
    padding-left: calc(var(--access-level, 0) * 24px);
}

.access-child-icon {
    transform: rotate(90deg);
    color: #94a3b8;
    margin-right: 8px;
}

.access-permission-row.access-nested-row {
    background: #fbfdff;
}

.access-permission-row:not(.access-row-full):not(.access-row-read-only) {
    color: #94a3b8;
    background: #f8fafc;
}

.access-permission-row.access-row-full .access-section-name::after,
.access-permission-row.access-row-read-only .access-section-name::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 8px;
    color: #16a34a;
    font-size: 11px;
}

.access-accordion-hidden,
.access-search-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .access-management-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .access-permission-search {
        max-width: none;
    }
}
