/* =====================================================
   Modern Dashboard Styles - Enhanced CRM Design
   ===================================================== */

/* =====================================================
   MODERN PAGE HEADER & COMPONENTS
   ===================================================== */

/* Modern Page Header */
.modern-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    color: #ffffff;
}

.modern-page-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.modern-page-header .header-left {
    flex: 1;
}

.modern-page-header .page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.modern-page-header .page-title i {
    font-size: 24px;
    opacity: 0.9;
}

.modern-page-header .page-subtitle {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

.modern-page-header .header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.modern-page-header .header-link {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.modern-page-header .quick-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modern-page-header .quick-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

/* Modern Buttons */
.btn-modern {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
}

.btn-modern.btn-primary {
    background: #ffffff !important;
    color: #667eea !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.btn-modern.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.4);
}

.btn-modern.btn-default {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-modern.btn-default:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-card .stat-content {
    flex: 1;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

/* Stat Color Variants */
.stat-card.stat-primary .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.stat-card.stat-primary .stat-value {
    color: #667eea;
}

.stat-card.stat-success .stat-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
}

.stat-card.stat-success .stat-value {
    color: #28a745;
}

.stat-card.stat-danger .stat-icon {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: #ffffff;
}

.stat-card.stat-danger .stat-value {
    color: #dc3545;
}

.stat-card.stat-info .stat-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: #ffffff;
}

.stat-card.stat-info .stat-value {
    color: #17a2b8;
}

.stat-card.stat-warning .stat-icon {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #333;
}

.stat-card.stat-warning .stat-value {
    color: #ff9800;
}

.stat-card.stat-purple .stat-icon {
    background: linear-gradient(135deg, #9c27b0 0%, #764ba2 100%);
    color: #ffffff;
}

.stat-card.stat-purple .stat-value {
    color: #9c27b0;
}

/* Modern Toolbar */
.modern-toolbar {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.modern-toolbar .filter-wrapper {
    display: inline-block;
}

/* Modern Panel */
.modern-panel {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.modern-panel .panel-body {
    padding: 24px;
}

/* DataTable Enhancements */
.modern-panel .table {
    margin-bottom: 0;
}

.modern-panel .table thead th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    border-bottom: 2px solid #e9ecef;
}

.modern-panel .table tbody tr {
    transition: all 0.2s ease;
}

.modern-panel .table tbody tr:hover {
    background: #f8f9fa;
}

.modern-panel .table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

/* Apply modern-panel styles to all panels globally */
.panel_s,
.panel-table-full {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.panel_s .panel-body,
.panel-table-full .panel-body {
    padding: 24px;
}

.panel_s .table,
.panel-table-full .table {
    margin-bottom: 0;
}

.panel_s .table thead th,
.panel-table-full .table thead th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px;
    border-bottom: 2px solid #e9ecef;
}

.panel_s .table tbody tr,
.panel-table-full .table tbody tr {
    transition: all 0.2s ease;
}

.panel_s .table tbody tr:hover,
.panel-table-full .table tbody tr:hover {
    background: #f8f9fa;
}

.panel_s .table tbody td,
.panel-table-full .table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modern-page-header {
        padding: 24px;
    }

    .modern-page-header .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .modern-page-header .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .modern-page-header .header-actions .btn-modern {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }
}

/* =====================================================
   MODERN FORM STYLES
   ===================================================== */

/* Modern Form Panel */
.modern-form-panel .panel-body {
    padding: 32px;
}

/* Modern Alerts */
.modern-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    border: none;
    margin-bottom: 20px;
}

.modern-alert .alert-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.modern-alert .alert-content {
    flex: 1;
}

.modern-alert.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fff8e1 100%);
    border-left: 4px solid #ffc107;
}

.modern-alert.alert-warning .alert-icon {
    background: #ffc107;
    color: #333;
}

.modern-alert.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #e1f5fe 100%);
    border-left: 4px solid #17a2b8;
}

.modern-alert.alert-info .alert-icon {
    background: #17a2b8;
    color: #ffffff;
}

/* Form Fields Enhancement */
.modern-form-panel .form-group {
    margin-bottom: 24px;
}

.modern-form-panel .form-control {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.modern-form-panel .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modern-form-panel label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.modern-form-panel .help-block {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
}

/* Modern Panel Footer */
.modern-panel-footer {
    background: #f8f9fa;
    padding: 20px 32px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-radius: 0 0 12px 12px;
}

/* Modern Form Buttons */
.btn-modern-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-modern-secondary {
    background: #ffffff !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-modern-secondary:hover {
    background: #667eea !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Nav Tabs Enhancement */
.modern-form-panel .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 24px;
}

.modern-form-panel .nav-tabs>li>a {
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    font-weight: 600;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.modern-form-panel .nav-tabs>li.active>a,
.modern-form-panel .nav-tabs>li.active>a:hover,
.modern-form-panel .nav-tabs>li.active>a:focus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
}

.modern-form-panel .nav-tabs>li>a:hover {
    background: #f8f9fa;
    border-color: transparent;
}

/* =====================================================
   CUSTOMER SIDEBAR TABS - MODERN DESIGN
   ===================================================== */

/* Mobile Select Dropdown */
.customer-tabs+select.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-weight: 600;
    background: #ffffff;
    transition: all 0.3s ease;
}

.customer-tabs+select.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Customer Tabs Container */
.customer-tabs {
    background: transparent;
    border-radius: 12px;
    padding: 8px;
    box-shadow: none;
    border: none;
}

.customer-tabs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.customer-tabs li {
    margin-bottom: 4px;
}

.customer-tabs li:last-child {
    margin-bottom: 0;
}

/* Tab Links */
.customer-tabs a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Default State */
.customer-tabs a.tw-text-neutral-800 {
    color: #495057 !important;
    background: transparent;
}

.customer-tabs a.tw-text-neutral-800:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%) !important;
    color: #667eea !important;
}

/* Active State */
.customer-tabs a.tw-bg-neutral-50 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Icons */
.customer-tabs a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.customer-tabs a.tw-text-neutral-800 i.tw-text-neutral-400 {
    color: #718096 !important;
}

.customer-tabs a.tw-text-neutral-800:hover i {
    color: #667eea !important;
}

.customer-tabs a.tw-bg-neutral-50 i {
    color: #ffffff !important;
}

/* Badge */
.customer-tabs .badge {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.customer-tabs a.tw-text-neutral-800 .badge {
    background: #e9ecef !important;
    color: #495057 !important;
}

.customer-tabs a.tw-text-neutral-800:hover .badge {
    background: #667eea !important;
    color: #ffffff !important;
}

.customer-tabs a.tw-bg-neutral-50 .badge {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Badge Color Variants */
.customer-tabs .badge.bg-info {
    background: #17a2b8 !important;
    color: #ffffff !important;
}

.customer-tabs .badge.bg-warning {
    background: #ffc107 !important;
    color: #333 !important;
}

.customer-tabs .badge.bg-danger {
    background: #dc3545 !important;
    color: #ffffff !important;
}

.customer-tabs .badge.bg-success {
    background: #28a745 !important;
    color: #ffffff !important;
}

/* Active Tab Badge Override */
.customer-tabs a.tw-bg-neutral-50 .badge.bg-info,
.customer-tabs a.tw-bg-neutral-50 .badge.bg-warning,
.customer-tabs a.tw-bg-neutral-50 .badge.bg-danger,
.customer-tabs a.tw-bg-neutral-50 .badge.bg-success {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Hover Animation */
.customer-tabs a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px 0 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.customer-tabs a.tw-bg-neutral-50::before {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .customer-tabs {
        display: none;
    }
}

/* Select2 Enhancement */
.modern-form-panel .select2-container--default .select2-selection--single {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    height: 40px;
    padding: 4px 14px;
}

.modern-form-panel .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 30px;
}

.modern-form-panel .select2-container--default.select2-container--focus .select2-selection--multiple,
.modern-form-panel .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #667eea;
}

/* Checkbox and Radio Enhancement */
.modern-form-panel .checkbox label,
.modern-form-panel .radio label {
    padding-left: 28px;
    font-weight: 500;
}

.modern-form-panel .checkbox input[type="checkbox"],
.modern-form-panel .radio input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-left: -28px;
}

/* File Input Enhancement */
.modern-form-panel .btn-file {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* Responsive Form */
@media (max-width: 768px) {
    .modern-form-panel .panel-body {
        padding: 20px;
    }

    .modern-panel-footer {
        padding: 16px 20px;
        flex-direction: column-reverse;
    }

    .modern-panel-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   SIDEBAR MODERN DESIGN - MINIMAL & FUNCTIONAL
   ===================================================== */

/* Sidebar Base Styles */
.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08);
    border-right: 1px solid #e9ecef;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* User Profile */
.sidebar-user-profile .dropdown-toggle.profile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: #ffffff !important;
}

.sidebar-user-profile .dropdown-toggle.profile:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.sidebar-user-profile .dropdown-toggle.profile span span {
    color: #ffffff !important;
}

.sidebar-user-profile .dropdown-menu {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sidebar-user-profile .dropdown-menu li a:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #667eea;
}

/* Menu Items - DO NOT override display or pointer-events */
#side-menu>li>a {
    color: #4a5568 !important;
    border-radius: 10px;
    margin: 2px 8px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

#side-menu>li>a:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%) !important;
    color: #667eea !important;
}

#side-menu>li.active>a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Menu Icons */
#side-menu>li>a i,
#side-menu .menu-icon {
    color: #718096 !important;
}

#side-menu>li>a:hover i,
#side-menu>li>a:hover .menu-icon {
    color: #667eea !important;
}

#side-menu>li.active>a i,
#side-menu>li.active .menu-icon {
    color: #ffffff !important;
}

/* Submenu - Let Bootstrap and Metis handle collapse completely */
#side-menu .nav-second-level {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%) !important;
    border-radius: 10px;
    margin: 4px 8px;
    padding: 4px 0;
}

#side-menu .nav-second-level li a {
    color: #5a6c7d !important;
    font-size: 13px;
    padding: 8px 16px 8px 42px !important;
    margin: 0 4px;
    border-radius: 8px;
}

#side-menu .nav-second-level li a:hover {
    background: linear-gradient(135deg, #e8f0fe 0%, #dce8ff 100%) !important;
    color: #667eea !important;
}

#side-menu .nav-second-level li.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
}

/* Badges */
#side-menu .badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

#side-menu .badge.bg-info {
    background: #17a2b8 !important;
}

#side-menu .badge.bg-warning {
    background: #ffc107 !important;
    color: #333 !important;
}

#side-menu .badge.bg-danger {
    background: #dc3545 !important;
}

#side-menu .badge.bg-success {
    background: #28a745 !important;
}

/* Arrow Icon */
#side-menu .fa.arrow,
#side-menu>li>a .arrow {
    color: #a0aec0 !important;
    transition: transform 0.3s ease;
}

#side-menu>li>a[aria-expanded="true"] .fa.arrow,
#side-menu>li>a[aria-expanded="true"] .arrow {
    transform: rotate(90deg);
}

#side-menu>li>a:hover .fa.arrow,
#side-menu>li>a:hover .arrow {
    color: #667eea !important;
}

#side-menu>li.active .fa.arrow,
#side-menu>li.active>a .arrow {
    color: #ffffff !important;
}

/* =====================================================
   HEADER/NAVBAR MODERN DESIGN
   ===================================================== */

#header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    height: 70px;
    border: none;
}

#header nav {
    background: transparent;
}

/* Logo Area */
#header #logo {
    background: transparent;
}

#header .logo-text {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Menu Toggle Button */
.hide-menu {
    color: rgba(255, 255, 255, 0.9) !important;
}

.hide-menu:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Search Bar */
#top_search input {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    backdrop-filter: blur(10px);
}

#top_search input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

#top_search input:focus {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

#top_search_button button {
    color: rgba(255, 255, 255, 0.8) !important;
}

#top_search input:focus~#top_search_button button {
    color: #ffffff !important;
}

/* Header Icons */
#header .navbar-nav>li>a {
    color: rgba(255, 255, 255, 0.9) !important;
}

#header .navbar-nav>li>a:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Quick Create Button */
#header .icon a span {
    background: rgba(255, 255, 255, 0.2) !important;
}

#header .icon a:hover span {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Notifications */
.notifications-icon {
    position: relative;
}

.notifications-icon .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545 !important;
    border: 2px solid #667eea;
}

/* Dashboard Global Styles */
#wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.content {
    padding: 30px;
}

/* Modern Page Header */
.modern-dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 30px;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.modern-dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.modern-dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.dashboard-welcome {
    position: relative;
    z-index: 2;
}

.dashboard-welcome h1 {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-welcome p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0;
}

.dashboard-quick-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-action-btn svg {
    width: 18px;
    height: 18px;
}

/* Modern Widget Styles */
.widget {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.widget:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.widget .panel_s {
    background: transparent;
    box-shadow: none;
    border: none;
    margin: 0;
}

.widget .panel-body {
    padding: 24px;
}

.widget-dragger {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 4px;
    cursor: move;
    border-radius: 16px 16px 0 0;
}

/* Top Stats Enhancement */
.top_stats_wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.top_stats_wrapper:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.quick-stats-invoices .top_stats_wrapper {
    border-left: 4px solid #667eea;
}

.quick-stats-leads .top_stats_wrapper {
    border-left: 4px solid #28a745;
}

.quick-stats-projects .top_stats_wrapper {
    border-left: 4px solid #ffc107;
}

.quick-stats-tasks .top_stats_wrapper {
    border-left: 4px solid #17a2b8;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 1s ease;
}

.progress-bar-danger {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.progress-bar-success {
    background: linear-gradient(90deg, #28a745 0%, #218838 100%);
}

.progress-bar-warning {
    background: linear-gradient(90deg, #ffc107 0%, #e0a800 100%);
}

.progress-bar-info {
    background: linear-gradient(90deg, #17a2b8 0%, #138496 100%);
}

/* Panel Heading Enhancement */
.panel-heading {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e9ecef;
    padding: 18px 24px;
    font-weight: 600;
    color: #2d3748;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Finance Overview Enhancement */
.home-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.home-summary>div {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.home-summary>div:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
}

/* Summary Numbers */
.text-dark.bold.summary-numbers {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Charts Enhancement */
canvas {
    border-radius: 12px;
}

/* Tables Enhancement */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 16px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
}

/* Activity Timeline Enhancement */
.mtop30.project-overview-expenses-finance {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Calendar Widget */
#calendar {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.fc-toolbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    border-radius: 12px 12px 0 0;
}

.fc-toolbar h2 {
    color: #ffffff !important;
}

.fc-button {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.fc-button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Screen Options Button */
.screen-options-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.screen-options-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Alerts Enhancement */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #1b5e20;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #b71c1c;
}

/* Badges Enhancement */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 12px;
}

/* Links Enhancement */
a {
    color: #667eea;
    transition: all 0.2s ease;
}

a:hover {
    color: #764ba2;
    text-decoration: none;
}

/* Buttons Enhancement */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    color: #ffffff;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: #ffffff;
}

/* Cards Enhancement */
.card {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Todo Items Enhancement */
.todo-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.todo-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* Upcoming Events Enhancement */
.event-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-left: 4px solid #667eea;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.event-item:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        padding: 15px;
    }

    .modern-dashboard-header {
        padding: 30px 15px;
        margin: -15px -15px 20px -15px;
        border-radius: 0 0 16px 16px;
    }

    .dashboard-welcome h1 {
        font-size: 24px;
    }

    .dashboard-quick-actions {
        flex-direction: column;
    }

    .quick-action-btn {
        width: 100%;
        justify-content: center;
    }

    .widget .panel-body {
        padding: 16px;
    }

    .home-summary>div {
        padding: 16px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget {
    animation: fadeInUp 0.5s ease-out;
}

.widget:nth-child(1) {
    animation-delay: 0.1s;
}

.widget:nth-child(2) {
    animation-delay: 0.2s;
}

.widget:nth-child(3) {
    animation-delay: 0.3s;
}

.widget:nth-child(4) {
    animation-delay: 0.4s;
}

/* Loading State */
.widget.loading {
    opacity: 0.6;
    pointer-events: none;
}

.widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* =====================================================
   MODERN DASHBOARD WIDGETS STYLING
   ===================================================== */

.modern-dashboard-widgets .panel_s {
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
}

.modern-dashboard-widgets .panel_s .panel-heading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border-bottom: none !important;
    padding: 16px 20px !important;
}

.modern-dashboard-widgets .panel_s .panel-heading h4,
.modern-dashboard-widgets .panel_s .panel-heading .panel-title {
    color: #ffffff !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.modern-dashboard-widgets .panel_s .panel-body {
    padding: 20px !important;
}

.modern-dashboard-widgets .widget {
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 20px !important;
}

/* =====================================================
   SETUP MENU SIDEBAR STYLES
   ===================================================== */

/* Setup Menu Wrapper */
#setup-menu-wrapper {
    background: #f9f9f9 !important;
}

/* Setup Menu Header */
#setup-menu-wrapper .customizer-heading {
    color: #0f172a !important;
    font-weight: 600 !important;
}

#setup-menu-wrapper .close-customizer {
    color: #64748b !important;
    cursor: pointer;
}

#setup-menu-wrapper .close-customizer:hover,
#setup-menu-wrapper .close-customizer:focus {
    color: #334155 !important;
}

/* Setup Menu Items */
#setup-menu>li>a {
    color: #4a5568 !important;
    font-weight: 500 !important;
}

#setup-menu>li>a .menu-text {
    color: #4a5568 !important;
}

#setup-menu>li>a .arrow {
    color: #4a5568 !important;
}

#setup-menu>li>a:hover,
#setup-menu>li>a:focus {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1) !important;
}

#setup-menu>li>a:hover .menu-text,
#setup-menu>li>a:focus .menu-text {
    color: #667eea !important;
}

#setup-menu>li>a:hover .arrow,
#setup-menu>li>a:focus .arrow {
    color: #667eea !important;
}

#setup-menu>li.active>a {
    color: #667eea !important;
    font-weight: 600 !important;
}

#setup-menu>li.active>a .menu-text {
    color: #667eea !important;
}

#setup-menu>li.active>a .arrow {
    color: #667eea !important;
}

/* Setup Menu Submenus */
#setup-menu li .nav-second-level li a {
    color: #4a5568 !important;
}

#setup-menu li .nav-second-level li a .sub-menu-text {
    color: #4a5568 !important;
}

#setup-menu li .nav-second-level li a:hover,
#setup-menu li .nav-second-level li a:focus {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.1) !important;
}

#setup-menu li .nav-second-level li a:hover .sub-menu-text,
#setup-menu li .nav-second-level li a:focus .sub-menu-text {
    color: #667eea !important;
}

#setup-menu li .nav-second-level li.active a {
    color: #667eea !important;
    font-weight: 600 !important;
}

#setup-menu li .nav-second-level li.active a .sub-menu-text {
    color: #667eea !important;
}