/*=========================================================
    mym Skin - Flat Modern
    Version 3.7
    ---------------------------------------------------------
    Flat modern design with smooth interactions
    Tables | Dashboard | Counters | Portlets | Forms
=========================================================*/

/*=========================================================
    ROOT VARIABLES
=========================================================*/
:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --card-hover: #fafbfc;
    --border: #e4e7ed;
    --border-light: #f0f2f5;
    --primary: #5b6abf;
    --primary-light: #eef0ff;
    --primary-gradient: linear-gradient(135deg, #5b6abf, #7c8cdb);
    --btn-primary-gradient: linear-gradient(135deg, #f59e0b, #f97316);
    --success: #2ecc71;
    --warning: #e67e22;
    --danger: #e74c3c;
    --info: #3498db;
    --text: #1e293b;
    --text-secondary: #475569;
    --muted: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 18px;
    --font: 'Inter', 'Segoe UI', -apple-system, sans-serif;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/*=========================================================
    DARK MODE OVERRIDE
    تفعيل دارك مود بإضافة class dark-mode إلى body
=========================================================*/
body.dark-mode {
    --bg: #0e1016;
    --card: #181b21;
    --card-hover: #1d2028;
    --border: #2a2d35;
    --border-light: #23262e;
    --primary: #7b8adf;
    --primary-light: #1e2247;
    --primary-gradient: linear-gradient(135deg, #7b8adf, #9aa7f0);
    --info: #5dade2;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --muted: #5a6577;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow: 0 4px 16px rgba(0,0,0,0.25);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.3);
}

body.dark-mode .page-sidebar-menu > li > a {
    color: var(--muted) !important;
}
body.dark-mode .page-sidebar-menu > li > a:hover {
    background: rgba(251,191,36,0.08) !important;
    color: #fbbf24 !important;
}
body.dark-mode .page-sidebar-menu > li > a:hover i {
    color: #f97316;
}
body.dark-mode .page-sidebar-menu > li.active > a {
    background: linear-gradient(135deg, #f97316, #f59e0b) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}
body.dark-mode .page-sidebar-menu > li.active > a i {
    color: #fff !important;
}
body.dark-mode .page-sidebar-menu > li ul.sub-menu li > a {
    color: #6b7280 !important;
}
body.dark-mode .page-sidebar-menu > li ul.sub-menu li > a:hover {
    background: rgba(251,191,36,0.08) !important;
    color: #fbbf24 !important;
}
body.dark-mode .page-sidebar-menu > li ul.sub-menu li.active > a {
    background: rgba(251,191,36,0.06) !important;
    color: #c2410c !important;
}
body.dark-mode .table thead tr th {
    background: var(--card-hover) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1.5px solid var(--border) !important;
}
body.dark-mode .table-scrollable,
body.dark-mode .table {
    background: var(--card);
}
body.dark-mode .table tbody tr td {
    color: var(--text-secondary);
    border-bottom: 1.5px solid var(--border) !important;
}

body.dark-mode .table-bordered {
    border: none !important;
}

body.dark-mode .table-bordered > thead > tr > th,
body.dark-mode .table-bordered > tbody > tr > th,
body.dark-mode .table-bordered > tfoot > tr > th,
body.dark-mode .table-bordered > thead > tr > td,
body.dark-mode .table-bordered > tbody > tr > td,
body.dark-mode .table-bordered > tfoot > tr > td {
    border: none !important;
    border-bottom: 1.5px solid var(--border) !important;
}

body.dark-mode .table-bordered > thead > tr > th,
body.dark-mode .table-bordered > thead > tr > td {
    border-bottom-width: 1.5px !important;
}
body.dark-mode .table-hover tbody tr:hover,
body.dark-mode .table tbody tr:hover {
    background: rgba(251,191,36,0.08) !important;
    color: #fbbf24;
}
body.dark-mode .table-striped > tbody > tr:nth-child(even) {
    background: transparent;
}
body.dark-mode .table-striped > tbody > tr:nth-child(even) > td {
    background: rgba(255,255,255,0.03);
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) {
    background: transparent;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > td {
    background: rgba(255,255,255,0.015);
}
body.dark-mode .table-hover > tbody > tr:hover {
    background-color: rgba(251,191,36,0.08);
}
body.dark-mode .table tbody tr.selected td,
body.dark-mode .row-selected td {
    background: var(--primary-light) !important;
}
body.dark-mode .page-content .page-breadcrumb {
    background: var(--card) !important;
}
body.dark-mode .page-content .page-breadcrumb.breadcrumb {
    background: var(--card) !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
}
body.dark-mode .panel,
body.dark-mode .panel-heading {
    background: var(--card) !important;
}
body.dark-mode .panel-footer {
    background: var(--card-hover) !important;
}
body.dark-mode .dropdown-menu {
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
body.dark-mode .dropdown-menu > li > a {
    color: var(--text);
}
body.dark-mode .dropdown-menu > li > a:hover {
    background: var(--card-hover);
    color: var(--text);
}
body.dark-mode .modal-content,
body.dark-mode .modal-header,
body.dark-mode .modal-body {
    background: var(--card);
}
body.dark-mode .modal-header {
    border-bottom: 1px solid var(--border);
}
body.dark-mode .modal-footer {
    background: var(--card-hover);
    border-top: 1px solid var(--border);
}
body.dark-mode .form-control {
    background: var(--card-hover) !important;
    border: 1.5px solid var(--border) !important;
    color: var(--text) !important;
}
body.dark-mode .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(123,138,223,0.12) !important;
    background: var(--card) !important;
}
body.dark-mode .form-control[readonly] {
    background: var(--card-hover) !important;
}
body.dark-mode .select2-container--default .select2-selection--single {
    background: var(--card-hover) !important;
    border: 1.5px solid var(--border) !important;
}
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text);
}
body.dark-mode .select2-dropdown {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .chosen-container-single .chosen-single {
    background: var(--card-hover) !important;
    border: 1.5px solid var(--border) !important;
    color: var(--text);
}
body.dark-mode .chosen-drop {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .header,
body.dark-mode .navbar,
body.dark-mode .navbar-default {
    background: var(--card) !important;
}
body.dark-mode .navbar-default .navbar-nav > li > a {
    color: var(--muted) !important;
}
body.dark-mode .navbar-default .navbar-nav > li > a:hover {
    color: #fbbf24 !important;
    background: rgba(251,191,36,0.08) !important;
}
body.dark-mode .page-sidebar {
    background: var(--card) !important;
    border-right: 1px solid var(--border-light);
}
body.dark-mode .footer {
    background: var(--card) !important;
    border-top: 1px solid var(--border);
    color: var(--muted);
}
body.dark-mode .filters-panel {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .portlet > .portlet-title {
    background: var(--card) !important;
    border-bottom: 1px solid var(--border);
}
body.dark-mode .portlet > .portlet-title > .caption {
    color: var(--text);
}
body.dark-mode .portlet > .portlet-body {
    background: var(--card);
}
body.dark-mode .modal-header .close {
    background: var(--card-hover);
    color: var(--muted);
}
body.dark-mode .modal-header .close:hover {
    background: var(--card-hover);
    color: var(--text);
}
body.dark-mode .listing-types {
    background: var(--card-hover);
}
body.dark-mode .listing-types a.active {
    background: var(--card);
    color: var(--text);
}
body.dark-mode ul.listing-grid > li {
    background: var(--card);
}
body.dark-mode ul.listing-mobile > li {
    background: var(--card);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
body.dark-mode ul.listing-mobile > li:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
body.dark-mode ul.listing-mobile .listing-section-heading {
    color: #9aa3ac;
}
body.dark-mode ul.listing-mobile .listing-section-table th {
    color: #9aa3ac;
}
body.dark-mode ul.listing-mobile .listing-section-table td {
    color: #e3e5e8;
}
body.dark-mode .list-inline {
    background: var(--card);
}
body.dark-mode .navbar-items {
    background: var(--card) !important;
}
body.dark-mode .page-sidebar-toggle {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .page-sidebar-toggle:hover {
    background: rgba(251,191,36,0.08);
    border-color: #f59e0b;
}
body.dark-mode .input-group-addon {
    background: var(--card-hover);
    border: 1.5px solid var(--border);
    color: var(--muted);
}
body.dark-mode .form-actions {
    background: var(--card-hover) !important;
    border-top: 1px solid var(--border) !important;
}
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #3a3f4a;
}
body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #4a5060;
}
body.dark-mode ::-webkit-scrollbar-track {
    background: var(--bg);
}
body.dark-mode .table-scrollable::-webkit-scrollbar-thumb {
    background: #3a3f4a;
}
body.dark-mode .table-scrollable::-webkit-scrollbar-track {
    background: var(--card-hover);
}
body.dark-mode .portlet-body-actions {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .portlet-body-actions::after {
    background: linear-gradient(to right, transparent, var(--card));
}
body.dark-mode .entitly-listing-buttons-right1 > .btn,
body.dark-mode .entitly-listing-buttons-right1 > .btn-group > .btn {
    background: var(--card-hover);
    border: 1px solid var(--border);
    color: var(--muted);
}
body.dark-mode .entitly-listing-buttons-right1 > .btn:hover,
body.dark-mode .entitly-listing-buttons-right1 > .btn-group > .btn:hover {
    background: rgba(251,191,36,0.08);
    border-color: #f59e0b;
    color: #fbbf24;
}
body.dark-mode .btn-default {
    background: var(--card-hover);
    color: var(--text);
    border: 1px solid var(--border) !important;
}
body.dark-mode .btn-default:hover {
    background: var(--card-hover);
    border-color: var(--border) !important;
}
body.dark-mode .table-item-details thead th,
body.dark-mode .table-item-details tr th {
    background: var(--card-hover) !important;
    border-bottom: 1.5px solid var(--border) !important;
    color: var(--text-secondary);
}
body.dark-mode .table-item-details tbody td,
body.dark-mode .table-item-details tr td {
    background: var(--card);
    border-bottom: 1.5px solid var(--border) !important;
    color: var(--text);
}
body.dark-mode .table-item-details tr:hover {
    background: rgba(251,191,36,0.04);
}
body.dark-mode .pagination > li > a,
body.dark-mode .pagination > li > span {
    background: var(--card-hover);
    color: var(--muted);
}
body.dark-mode .pagination > li > a:hover {
    background: rgba(251,191,36,0.12);
    color: #f97316;
}
body.dark-mode .pagination li:first-child > a,
body.dark-mode .pagination li:last-child > a {
    background: var(--card-hover);
    color: var(--muted);
}
body.dark-mode .pagination li:first-child.active > a,
body.dark-mode .pagination li:last-child.active > a {
    background: transparent !important;
    color: #3a3f4a !important;
}
body.dark-mode .pagination li:first-child > a:hover,
body.dark-mode .pagination li:last-child > a:hover {
    background: rgba(251,191,36,0.12);
    color: #f97316;
}
body.dark-mode .nav-tabs > li > a {
    background: var(--card-hover);
    color: var(--muted);
}
body.dark-mode .nav-tabs > li > a:hover {
    background: var(--primary-light);
    color: var(--primary);
}
body.dark-mode .kanban-group,
body.dark-mode .kanban-column {
    background: var(--card-hover);
}
body.dark-mode .kanban-item {
    background: var(--card);
}
body.dark-mode .fc {
    background: var(--card);
}
body.dark-mode .fc-theme-standard td,
body.dark-mode .fc-theme-standard th {
    border-color: var(--border);
}
body.dark-mode .fc-day-today {
    background: rgba(251,191,36,0.06) !important;
}
body.dark-mode .highcharts-background {
    fill: var(--card) !important;
}
body.dark-mode .highcharts-title {
    fill: var(--text) !important;
}
body.dark-mode .highcharts-axis-labels text {
    fill: var(--muted) !important;
}
body.dark-mode .funnelchart {
    background: var(--card) !important;
}
body.dark-mode .funnelchart .highcharts-grid-line {
    stroke: var(--border-light) !important;
}
body.dark-mode .funnelchart .highcharts-axis-line {
    stroke: var(--border) !important;
}
body.dark-mode .funnelchart .highcharts-axis-labels text {
    fill: var(--muted) !important;
}
body.dark-mode .funnelchart .highcharts-title {
    fill: var(--text) !important;
}
body.dark-mode .funnelchart .highcharts-data-label text {
    fill: var(--text-secondary) !important;
}
body.dark-mode .funnelchart .highcharts-data-label-box {
    fill: var(--card-hover) !important;
    stroke: var(--border) !important;
}
body.dark-mode .funnelchart .highcharts-tooltip-box {
    fill: var(--card-hover) !important;
}
body.dark-mode .mym-counter-ticker {
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
body.dark-mode .mym-counter-ticker-item {
    border-right: 1px solid var(--border-light);
}
body.dark-mode .mym-counter-ticker-item .ticker-label {
    color: var(--muted);
}
body.dark-mode .mym-counter-ticker-item .ticker-value {
    color: var(--text);
}
body.dark-mode .mym-counter-ticker-item:active {
    background: rgba(251,191,36,0.08);
}
body.dark-mode .mym-nav-bar {
    background: var(--card-hover);
    border-bottom: 1px solid var(--border);
}
body.dark-mode .mym-nav-bar-item {
    border-right: 1px solid var(--border-light);
    color: var(--muted);
}
body.dark-mode .mym-nav-bar-item:hover {
    background: rgba(251,191,36,0.04);
    color: #fbbf24;
}
body.dark-mode .mym-nav-bar-item.active {
    border-bottom: 3px solid #f59e0b;
    background: rgba(251,191,36,0.06);
    color: #fbbf24;
}
body.dark-mode .mym-nav-bar-item span {
    color: var(--muted);
}
body.dark-mode ::selection {
    background: var(--primary);
    color: #fff;
}
body.dark-mode .popover {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .popover-title {
    background: var(--card-hover);
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
body.dark-mode .tooltip-inner {
    background: var(--card-hover);
    color: var(--text);
}
body.dark-mode .progress {
    background: var(--card-hover);
}
body.dark-mode .label-success {
    background: rgba(46,204,113,0.18) !important;
    color: #6ddb9e !important;
}
body.dark-mode .label-danger {
    background: rgba(231,76,60,0.18) !important;
    color: #f1948a !important;
}
body.dark-mode .label-warning {
    background: rgba(245,158,11,0.18) !important;
    color: #fbbf24 !important;
}
body.dark-mode .label-info {
    background: rgba(93,173,226,0.18) !important;
    color: #85c1e9 !important;
}
body.dark-mode .label-primary {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}
body.dark-mode .alert-success {
    background: rgba(46,204,113,0.12) !important;
    color: #6ddb9e !important;
    border: 1px solid rgba(46,204,113,0.2) !important;
}
body.dark-mode .alert-danger {
    background: rgba(231,76,60,0.12) !important;
    color: #f1948a !important;
    border: 1px solid rgba(231,76,60,0.2) !important;
}
body.dark-mode .alert-warning {
    background: rgba(245,158,11,0.12) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245,158,11,0.2) !important;
}
body.dark-mode .alert-info {
    background: rgba(93,173,226,0.12) !important;
    color: #85c1e9 !important;
    border: 1px solid rgba(93,173,226,0.2) !important;
}
body.dark-mode fieldset {
    border: 1.5px solid var(--border);
}
body.dark-mode legend {
    color: var(--text);
}
body.dark-mode .form-section {
    color: var(--text) !important;
}
body.dark-mode .mym-bottom-nav {
    background: var(--card);
    border-top: 1px solid var(--border);
}
body.dark-mode .tt-table div.tt div.content {
    border: 1px solid var(--border);
    background-color: var(--card-hover);
}
body.dark-mode .tt-table div.tt div.tail {
    border: 1px solid var(--border);
}
body.dark-mode .tt-table div.tt-parent div.content {
    background-color: rgba(245,158,11,0.1);
    border-color: #f59e0b;
}
body.dark-mode .mym-scroll-wrap::before {
    background: linear-gradient(to right, var(--card), transparent) !important;
}
body.dark-mode .mym-scroll-wrap::after {
    background: linear-gradient(to left, var(--card), transparent) !important;
}
body.dark-mode .gantt-control {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .gantt-control:hover {
    background: var(--card-hover);
}
body.dark-mode #wdr-toolbar {
    background: var(--card) !important;
    border-bottom: 1px solid var(--border) !important;
}
body.dark-mode .chats li.in .message {
    background: var(--card-hover) !important;
}
body.dark-mode .chats li.out .message {
    background: var(--primary-light) !important;
}
body.dark-mode .well {
    background: var(--card-hover);
    border: 1px solid var(--border);
}
body.dark-mode .widget {
    background: var(--card);
    border: 1px solid var(--border);
}
body.dark-mode .widget-single-counter {
    background: var(--card-hover);
    color: var(--text);
}
body.dark-mode .widget-summary .widget-subtitle {
    border-bottom-color: var(--border);
}
body.dark-mode .stat-block,
body.dark-mode .stats-default {
    background: var(--card) !important;
    box-shadow: var(--shadow);
}
body.dark-mode .stat-block .percent,
body.dark-mode .stats-default .percent {
    color: var(--text) !important;
}
body.dark-mode hr {
    border-top: 1px solid var(--border);
}
body.dark-mode .close {
    color: var(--muted);
    text-shadow: none;
}

/* default.css overrides */
body.dark-mode .sortable li {
    color: var(--text) !important;
    border-color: var(--border) !important;
    background: var(--card-hover) !important;
}
body.dark-mode .sortable li.fieldtype_section {
    background: var(--card-hover) !important;
}
body.dark-mode .panel-body-actions {
    border-bottom: 1px solid var(--border) !important;
}
body.dark-mode .table.thead-transform thead {
    background: var(--card-hover) !important;
}
body.dark-mode .dashboard-reports-config > .toggler {
    background: var(--card-hover) !important;
}
body.dark-mode .dashboard-reports-config > .toggler:hover {
    background: var(--card) !important;
}
body.dark-mode .fieldtype-image-container {
    border-color: var(--border) !important;
}
body.dark-mode .attachments-gallery .gallery-image {
    border-color: var(--border) !important;
}
body.dark-mode .table-fixed-cell {
    background: var(--card) !important;
    border-right-color: var(--border) !important;
    border-top-color: var(--border) !important;
    border-bottom-color: var(--border) !important;
}
body.dark-mode .panel-timer {
    border-left-color: var(--border) !important;
}
body.dark-mode .panel-timer.timer-active {
    border-left-color: #f0ad4e !important;
}
body.dark-mode .portlet-filters-preview .portlet-body .divider {
    border-top-color: var(--border) !important;
}
body.dark-mode .filters-preview-box {
    border-color: var(--border) !important;
}
body.dark-mode .portlet-filters-preview .btn-filters-templates {
    background-color: var(--card) !important;
    border-right-color: var(--border) !important;
}
body.dark-mode .stats-overview-cont .stats-overview:hover {
    background: var(--card-hover) !important;
}
body.dark-mode blockquote {
    border-left-color: var(--border) !important;
}
body.dark-mode .navbar-default .navbar-nav > li.selected > a {
    background: var(--card-hover) !important;
}
body.dark-mode .navbar-items .navbar-brand.selected {
    background: var(--card-hover) !important;
}
body.dark-mode .section-heading {
    background: var(--card-hover) !important;
}
body.dark-mode .dhtmlx-gantt-menu {
    background: var(--card-hover) !important;
    border-color: var(--border) !important;
}
body.dark-mode .kanban-heading-block-transform .kanban-heading {
    background: var(--card-hover) !important;
}
body.dark-mode .ul-kanban-hover {
    background: var(--card-hover) !important;
}
body.dark-mode ul.list li {
    border-top-color: var(--border) !important;
}
.table-tfoot-sticky tfoot {
    border-top: 2px solid var(--border, #ddd) !important;
}
.table > tfoot > tr > td,
.table > tfoot > tr > th {
    border-top: 2px solid var(--border, #ddd) !important;
}
body.dark-mode .table-tfoot-sticky tfoot {
    background: var(--card) !important;
    box-shadow: 0 -6px 6px -6px rgba(0,0,0,0.3) !important;
    border-top: 2px solid var(--border, #444) !important;
}
body.dark-mode .table > tfoot > tr > td,
body.dark-mode .table > tfoot > tr > th {
    border-top: 2px solid var(--border, #444) !important;
}
body.dark-mode .fontawesome-icon-list .fa-hover a {
    color: var(--text) !important;
}
body.dark-mode .fontawesome-icon-list .fa-hover a:hover {
    background-color: var(--card-hover) !important;
}
body.dark-mode .table-sidebar-action {
    background-color: var(--card-hover) !important;
    border-left-color: var(--border) !important;
    border-right-color: var(--border) !important;
}
body.dark-mode .table-sidebar-body {
    background: var(--card) !important;
}
body.dark-mode .google-map-distance {
    border-color: var(--border) !important;
    background: var(--card-hover) !important;
}
body.dark-mode .CodeMirror {
    border-color: var(--border) !important;
}
body.dark-mode .pivot_table_chart_side {
    background: var(--card) !important;
}
body.dark-mode .pivot_table_bar {
    background-color: var(--card-hover) !important;
}
body.dark-mode div.timeline-navigation.ui-state-highlight {
    background: var(--card) !important;
    border-color: var(--border) !important;
}
body.dark-mode .leaflet-popup-content table th,
body.dark-mode .leaflet-popup-content table td {
    border-top-color: var(--border) !important;
}
body.dark-mode .color-picker-box {
    border-color: var(--border) !important;
}
body.dark-mode ul.listing-grid > li:hover {
    background-color: var(--card-hover) !important;
}
body.dark-mode .lineawesome-icon-list .icons-item:hover {
    background-color: var(--card-hover) !important;
}
body.dark-mode .lineawesome-icon-list .icons-item .icons__text {
    color: var(--text) !important;
}
body.dark-mode ul.listing-mobile > li.note-success {
    background-color: rgba(46,204,113,0.12) !important;
    border-color: rgba(46,204,113,0.25) !important;
}
body.dark-mode ul.listing-mobile > li.note-info {
    background-color: rgba(93,173,226,0.12) !important;
    border-color: rgba(93,173,226,0.25) !important;
}
body.dark-mode ul.listing-mobile > li.note-warning {
    background-color: rgba(245,158,11,0.12) !important;
    border-color: rgba(245,158,11,0.25) !important;
}
body.dark-mode ul.listing-mobile > li.note-danger {
    background-color: rgba(231,76,60,0.12) !important;
    border-color: rgba(231,76,60,0.25) !important;
}

/* Dark mode toggle button in header */
.mym-dark-toggle a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
    text-decoration: none !important;
    padding: 0 !important;
    background: transparent !important;
}
.mym-dark-toggle a:hover {
    background: var(--primary-light) !important;
}
body.dark-mode .mym-dark-toggle a:hover {
    background: rgba(251,191,36,0.08) !important;
}

/*=========================================================
    BASE RESET
=========================================================*/
html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text) !important;
    font-family: var(--font) !important;
    font-size: clamp(14px, 1vw + 10px, 18px);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/*=========================================================
    TYPOGRAPHY
=========================================================*/
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text) !important;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.text-muted {
    color: var(--muted) !important;
}

a {
    color: var(--primary);
    transition: color 0.2s ease;
}

a:hover {
    color: #4a58b0;
    text-decoration: none;
}

/*=========================================================
    PAGE CONTENT
=========================================================*/
.page-content {
    background: var(--bg) !important;
    padding: 28px;
    animation: pageEnter 0.3s ease;
}

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

/*=========================================================
    BREADCRUMB
=========================================================*/
.page-content .page-breadcrumb {
    background: #fff !important;
    border: none !important;
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}
.page-content .page-breadcrumb li {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
}

.page-content .page-breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}



/*=========================================================
    PORTLET
=========================================================*/
.portlet {
    background: var(--card);
    border: none !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 28px;
    border-top: 4px solid #f59e0b;
}

.portlet:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.portlet > .portlet-title {
    background: #fff !important;
    min-height: 52px;
    padding: 0 24px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-bottom: 1px solid #eef0f2;
    gap: 12px;
}

.portlet > .portlet-title > .caption {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.01em;
    position: relative;
}

.portlet > .portlet-title > .caption::before {
    content: '';
    width: 3px;
    height: 18px;
    border-radius: 4px;
    background: var(--btn-primary-gradient);
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(249,115,22,0.25);
}

.portlet > .portlet-title > .caption > i {
    color: var(--primary);
    font-size: 16px;
    width: 18px;
    text-align: center;
    opacity: 0.7;
}

.portlet > .portlet-title > .tools {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    padding-left: 12px;
}

.portlet > .portlet-title > .tools > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 13px;
}

.portlet > .portlet-title > .tools > a:hover {
    background: #f1f5f9;
    color: #334155;
}

.portlet > .portlet-title > .tools > a.expand,
.portlet > .portlet-title > .tools > a.collapse {
    font-family: 'FontAwesome';
    font-size: 16px;
    color: #64748b;
    background-image: none !important;
    width: 28px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s ease, color 0.15s ease;
}

.portlet > .portlet-title > .tools > a.expand::before,
.portlet > .portlet-title > .tools > a.collapse::before {
    content: '\f078';
    display: inline-block;
}

.portlet > .portlet-title > .tools > a.collapse {
    transform: rotate(180deg);
}

.portlet > .portlet-title > .tools > a.expand {
    transform: rotate(0deg);
}

.portlet > .portlet-body {
    background: #fff;
    padding: 24px;
}

.portlet > .portlet-title > .actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    margin-left: auto;
}

.portlet > .portlet-title > .actions > .btn,
.portlet > .portlet-title > .actions > .btn-group {
    flex-shrink: 0;
}

.portlet > .portlet-title > .actions > .btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    min-height: 30px;
    border-radius: 6px;
    gap: 4px;
}

/* When both tools and actions exist */
.portlet > .portlet-title > .tools + .actions {
    margin-left: 0;
}

/*=========================================================
    DASHBOARD STATS / COUNTERS
=========================================================*/
.stats-overview-cont {
    display: flex;
    flex-wrap: wrap;
}

.stats-overview-cont > [class*="col-"] {
    display: flex;
}

.stat-block,
.stats-default {
    background: #fff !important;
    border: none !important;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
}

/* Remove nested table layout for clean flex display */
.stat-block table,
.stats-default table,
.stat-block table tbody,
.stats-default table tbody,
.stat-block table tr,
.stats-default table tr,
.stat-block table td,
.stats-default table td {
    background: transparent !important;
    border: none !important;
    display: block;
    padding: 0;
    margin: 0;
    width: 100%;
}

.stat-block table table,
.stats-default table table {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-block table table tbody,
.stats-default table table tbody {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
}

.stat-block table table tr,
.stats-default table table tr {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
}

.stat-block table table td,
.stats-default table table td {
    width: auto;
}

/* The counter number */
.stat-block .display.stat,
.stats-default .display.stat {
    display: flex !important;
    align-items: baseline;
}

.stat-block .percent,
.stats-default .percent {
    font-size: 38px !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* Totals area */
.stat-block .totals,
.stats-default .totals {
    margin-top: 2px;
    font-size: 13px;
}

.stat-block .totals table,
.stats-default .totals table {
    display: table !important;
    width: auto;
}

.stat-block .totals table tbody,
.stats-default .totals table tbody,
.stat-block .totals table tr,
.stats-default .totals table tr {
    display: table-row !important;
}

.stat-block .totals table td,
.stats-default .totals table td,
.stat-block .totals table th,
.stats-default .totals table th {
    display: table-cell !important;
    padding: 1px 4px !important;
    font-size: 12px;
}

/* The title/label */
.stat-block .details,
.stats-default .details {
    margin-top: 6px;
}

.stat-block .title,
.stats-default .title {
    color: var(--muted) !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0;
    line-height: 1.3;
}

.stat-block:hover,
.stats-default:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

/* Icon background decoration */
.stat-block::after,
.stats-default::after {
    content: '\f0ce';
    font-family: 'FontAwesome';
    position: absolute;
    right: -6px;
    bottom: -10px;
    font-size: 64px;
    opacity: 0.04;
    transform: rotate(-8deg);
    pointer-events: none;
}

.stat-block .number,
.stats-default .number {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.stat-block i,
.stats-default i {
    font-size: 28px;
    color: var(--muted);
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.stat-block:hover i,
.stats-default:hover i {
    opacity: 0.4;
}

/*=========================================================
    CARDS / PANELS
=========================================================*/
.panel {
    background: #fff !important;
    border: none !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.panel-heading {
    background: #fff !important;
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.panel-body {
    padding: 24px;
}

.panel-footer {
    background: #fafbfc !important;
    border-top: 1px solid var(--border);
    padding: 14px 24px;
}

/*=========================================================
    TABLES
=========================================================*/
.table-scrollable {
    border: none !important;
    border-radius: var(--radius-lg);
    overflow: auto;
    box-shadow: var(--shadow);
    background: #fff;
}

.table-scrollable > .table > thead > tr > th,
.table-scrollable > .table > tbody > tr > td {
    white-space: nowrap;
}

.table {
    margin: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.table-bordered {
    border: none !important;
}

.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border: none !important;
    border-bottom: 1.5px solid var(--border) !important;
}

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
    border-bottom-width: 1.5px !important;
}

.table thead tr th {
    background: #f8f9fc !important;
    color: var(--text-secondary) !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 16px 18px;
    border: none !important;
    border-bottom: 1.5px solid var(--border) !important;
}


.table thead .btn-group .btn {
    padding: 3px 10px;
    font-size: 11px;
    min-height: 24px;
    line-height: 1.4;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr td {
    padding: 14px 18px;
    border: none !important;
    border-bottom: 1.5px solid var(--border) !important;
    color: var(--text);
    vertical-align: middle;
    font-size: 13.5px;
}

.table tbody tr:last-child td {
    border-bottom: none !important;
}

.table-hover tbody tr:hover,
.table tbody tr:hover {
    background: #fef3c7 !important;
    color: #92400e;
}

/* Table sticky header */
.table-thead-sticky thead {
    position: sticky;
    top: 0;
    z-index: 11;
    background: #f8f9fc;
}
.table-thead-sticky thead tr th {
    position: sticky;
    top: 0;
    z-index: 12;
}
body.dark-mode .table-thead-sticky thead {
    background: var(--card) !important;
    box-shadow: 0 8px 6px -6px rgba(0,0,0,0.3) !important;
}

.table-striped > tbody > tr:nth-child(even) {
    background: #fafbfd;
}

.table tbody tr.selected td,
.row-selected td {
    background: #eef1ff !important;
}

.table .label {
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}

.table td a {
    font-weight: 600;
    color: var(--primary);
}

.table td a:hover {
    color: #4a58b0;
}

/* Table sorting */
.listing_order_asc,
.listing_order_desc {
    background: #eef1ff !important;
    color: var(--primary) !important;
}

/*=========================================================
    TABLE - ITEM DETAILS (View Page)
=========================================================*/
.table-item-details {
    border: none !important;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-item-details thead th,
.table-item-details tr th {
    width: 220px;
    background: #f8f9fc !important;
    border: none !important;
    border-bottom: 1.5px solid var(--border) !important;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    padding: 14px 18px;
}

.table-item-details tbody td,
.table-item-details tr td {
    background: #fff;
    border: none !important;
    border-bottom: 1.5px solid var(--border) !important;
    color: var(--text);
    padding: 14px 18px;
}

.table-item-details tr:last-child th,
.table-item-details tr:last-child td {
    border-bottom: none !important;
}

.table-item-details tr:hover {
    background: #f8faff;
}



/*=========================================================
    PAGINATION
=========================================================*/
.pagination {
    gap: 4px;
    margin: 8px 0;
}

.pagination > li > a,
.pagination > li > span {
    border: none !important;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    font-weight: 600;
    font-size: 13px;
    padding: 0 6px;
}

.pagination > li > a:hover {
    background: #fef3c7;
    color: #f97316;
    transform: translateY(-1px);
}

.pagination > .active > a,
.pagination > .active > span {
    background: linear-gradient(135deg, #f97316, #f59e0b) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(249,115,22,0.25);
}

/* Disabled prev/next (first page / last page) */
.pagination li:first-child.active > a,
.pagination li:last-child.active > a {
    background: transparent !important;
    color: #d1d5db !important;
    box-shadow: none !important;
    cursor: default;
    transform: none;
}

/* Mobile & tablet: hide page numbers, keep arrows + active page only */
@media (max-width: 991px) {
    .pagination:not(.pagination-sm) li:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }
    .pagination:not(.pagination-sm) li.active {
        pointer-events: none;
    }
    /* Bigger touch targets on mobile */
    .pagination > li > a,
    .pagination > li > span {
        min-width: 44px;
        height: 44px;
        font-size: 15px;
    }
}

/*=========================================================
    BUTTONS
=========================================================*/
.btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: none;
    min-height: 42px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--btn-primary-gradient);
    color: #fff;
    box-shadow: 0 6px 16px rgba(245,158,11,0.3);
}

.btn-primary:hover {
    background: #ea580c;
    box-shadow: 0 10px 24px rgba(245,158,11,0.35);
    color: #fff;
}

.btn-default {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border) !important;
}

.btn-default:hover {
    background: #f8f9fc;
    border-color: #cdd1d9 !important;
}

.btn-success {
    background: var(--success);
    box-shadow: 0 6px 16px rgba(46,204,113,0.2);
}

.btn-success:hover {
    background: #27ae60;
}

.btn-danger {
    background: var(--danger);
    box-shadow: 0 6px 16px rgba(231,76,60,0.2);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: var(--warning);
    box-shadow: 0 6px 16px rgba(243,156,18,0.2);
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-info {
    background: var(--info);
    box-shadow: 0 6px 16px rgba(52,152,219,0.2);
}

.btn-info:hover {
    background: #2980b9;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
    min-height: 36px;
}

.btn-xs {
    padding: 4px 12px;
    font-size: 12px;
    min-height: 28px;
}

.btn-group .btn {
    margin-right: 4px;
}

/*=========================================================
    FORMS
=========================================================*/
.form-group {
    margin-bottom: 22px;
}

.control-label {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 13.5px;
}

.form-control {
    height: 46px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border) !important;
    background: #fff !important;
    color: var(--text) !important;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: none;
    padding: 0 16px;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(91,106,191,0.1) !important;
}

textarea.form-control {
    min-height: 110px;
    padding: 12px 16px;
}

.form-control[readonly] {
    background: #f8f9fc !important;
}

.form-control::placeholder {
    color: var(--muted);
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group-addon {
    background: #f8f9fc;
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--muted);
    font-size: 15px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

.input-group .form-control {
    height: auto;
    min-height: 42px;
    flex: 1 1 auto;
    border-radius: 0;
}

.input-group .form-control:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.input-group-addon:last-child {
    border-left: none;
    border-right: 1.5px solid var(--border);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group-btn {
    display: flex;
}

.input-group-btn .btn {
    height: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group-btn:first-child .btn {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-btn:last-child .btn {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group.input-medium {
    width: 240px;
}

.required-label {
    color: var(--danger) !important;
    font-weight: 700;
}

.form-actions {
    background: #fafbfc !important;
    border-top: 1px solid var(--border) !important;
    padding: 18px 24px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/*=========================================================
    SELECT2
=========================================================*/
.select2-container--default .select2-selection--single {
    height: 46px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border) !important;
}

.select2-container .select2-selection--single {
    height: 46px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
    color: var(--text);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
}

.select2-container--default .select2-selection--multiple {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border) !important;
    min-height: 46px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--primary) !important;
}

.select2-selection__choice {
    background: var(--primary-light) !important;
    border: none !important;
    color: var(--primary) !important;
    border-radius: 999px !important;
    padding: 4px 12px !important;
}

.select2-dropdown {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

/*=========================================================
    CHOSEN
=========================================================*/
.chosen-container-single .chosen-single {
    height: 46px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: #fff;
    line-height: 44px;
    box-shadow: none;
}

.chosen-container-active .chosen-single {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91,106,191,0.1);
}

.chosen-drop {
    border: none;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

/*=========================================================
    CHECKBOXES & RADIOS
=========================================================*/
input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

input[type=radio] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/*=========================================================
    TABS
=========================================================*/
.nav-tabs {
    border-bottom: none;
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.nav-tabs > li {
    margin: 0;
}

.nav-tabs > li > a {
    border: none !important;
    border-radius: var(--radius-sm);
    background: #f0f2f5;
    color: var(--muted);
    padding: 10px 18px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.nav-tabs > li > a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-tabs > li.active > a {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(91,106,191,0.2);
}

.tab-content {
    border: none !important;
    padding: 0 !important;
    background: none !important;
}

/*=========================================================
    MODALS
=========================================================*/
.modal-content {
    border: none !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 20px 26px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.modal-body {
    padding: 26px;
    background: #fff;
}

.modal-footer {
    background: #fafbfc;
    border-top: 1px solid var(--border);
    padding: 16px 26px;
}

.modal-header .close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    opacity: 0.6;
    transition: all 0.2s ease;
    font-size: 20px;
    background: #f0f2f5;
    line-height: 34px;
    text-align: center;
}

.modal-header .close:hover {
    opacity: 1;
    background: #e4e7ed;
    transform: rotate(90deg);
}

/*=========================================================
    DROPDOWNS
=========================================================*/
.dropdown-menu {
    border: none !important;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    animation: dropdownIn 0.15s ease;
}

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

.dropdown-menu > li > a {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.15s ease;
}

.dropdown-menu > li > a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-menu .divider {
    margin: 6px 0;
    background: var(--border);
}

/*=========================================================
    ALERTS
=========================================================*/
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 16px 20px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary);
}

/*=========================================================
    LABELS / BADGES
=========================================================*/
.label,
.badge {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.label {
    padding: 5px 12px;
    font-size: 12px;
}

.badge {
    padding: 5px 10px;
    font-size: 12px;
}

.badge-danger {
    background: #e74c3c !important;
    color: #fff !important;
}

.label-success {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.label-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.label-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.label-info {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.label-primary {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

/*=========================================================
    PROGRESS BARS
=========================================================*/
.progress {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #edf2f7;
    box-shadow: none;
}

.progress-bar {
    border-radius: 999px;
}

/*=========================================================
    HEADER / NAVBAR
=========================================================*/
.header,
.navbar,
.navbar-default {
    background: #fff !important;
    border: none !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header .navbar-brand {
    font-size: 20px;
    font-weight: 800;
    color: var(--text) !important;
    letter-spacing: -0.03em;
}

.navbar-default .navbar-nav > li > a {
    color: var(--muted) !important;
    border: none !important;
    background: none !important;
    padding: 16px 16px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.navbar-default .navbar-nav > li > a:hover {
    color: var(--primary) !important;
    background: var(--primary-light) !important;
    border-radius: var(--radius-sm);
}

.header .navbar-nav > li > a:hover i,
.header .navbar-nav > li > a:hover .fa,
.header .navbar-nav > li > a:hover .glyphicon {
    color: #FEB704 !important;
}

.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .active > a {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    border-radius: var(--radius-sm);
    position: relative;
}
.navbar-default .navbar-nav > .active > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

/* Search in header */
.header .search-form .form-control {
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    background: #f0f2f5;
    box-shadow: none;
    padding-left: 16px;
    font-weight: 500;
}

.header .search-form .form-control:focus {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(91,106,191,0.1);
}

/*=========================================================
    SIDEBAR
=========================================================*/
.page-sidebar {
    background: #fff !important;
    border-right: 1px solid #f0f0f0;
    box-shadow: 2px 0 12px rgba(0,0,0,0.03);
}

.page-sidebar-menu {
    padding: 6px 10px 16px;
}

.page-sidebar-menu > li {
    margin-bottom: 2px;
    list-style: none;
}

.page-sidebar-menu > li > a {
    border: none !important;
    border-radius: 10px;
    padding: 10px 14px;
    color: #6b7280 !important;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.page-sidebar-menu > li > a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: #9ca3af;
    transition: all 0.15s ease;
}

.page-sidebar-menu > li > a:hover {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.page-sidebar-menu > li > a:hover i {
    color: #f97316;
}

.page-sidebar-menu > li.active > a {
    background: linear-gradient(135deg, #f97316, #f59e0b) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(249,115,22,0.3);
    font-weight: 600;
}

.page-sidebar-menu > li.active > a i {
    color: #fff !important;
}

.page-sidebar-menu > li.active {
    border-right: none !important;
}

/* Nav arrow */
.page-sidebar-menu .arrow:before {
    color: #9ca3af !important;
    font-size: 10px;
}

.page-sidebar-menu li.active .arrow:before {
    color: #fff !important;
}

/* Submenu */
.page-sidebar-menu li ul.sub-menu {
    background: none !important;
    margin-top: 2px;
    padding: 0;
}

.page-sidebar-menu li ul.sub-menu li {
    margin: 1px 0;
}

.page-sidebar-menu li ul.sub-menu li > a {
    border: none !important;
    border-radius: 8px;
    color: #6b7280 !important;
    padding: 8px 14px 8px 32px;
    font-size: 12.5px;
    font-weight: 400;
    transition: all 0.15s ease;
    text-decoration: none;
}

.page-sidebar-menu li ul.sub-menu li > a:hover {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.page-sidebar-menu li ul.sub-menu li.active > a {
    background: #fff7ed !important;
    color: #c2410c !important;
    font-weight: 600;
}

/* Sidebar closed */
.page-sidebar-closed .page-sidebar-menu > li {
    overflow: visible !important;
}
.page-sidebar-closed .page-sidebar-menu > li > a {
    justify-content: center;
    padding: 10px 0;
    margin: 0 6px;
}

.page-sidebar-closed .page-sidebar-menu > li > a i {
    width: 22px;
    font-size: 16px;
    text-align: center;
}

.page-sidebar-closed .page-sidebar-menu > li > a .title,
.page-sidebar-closed .page-sidebar-menu > li > a .arrow {
    display: none !important;
}

.page-sidebar-closed .page-sidebar-menu > li.active > a {
    border-radius: 8px !important;
    margin: 0 6px;
    padding: 10px 0;
}

.page-sidebar-closed .page-sidebar-menu > li.active > a i {
    color: #fff !important;
}

.page-sidebar-closed .page-sidebar-menu > li:hover > a {
    margin: 0;
    border-radius: 8px;
    padding: 10px 12px;
    justify-content: flex-start;
    gap: 10px;
}

.page-sidebar-closed .page-sidebar-menu > li:hover > a i {
    color: #f97316 !important;
    width: 20px;
}

.page-sidebar-closed .page-sidebar-menu > li:hover > a .title {
    display: inline-block !important;
    white-space: nowrap;
}

.page-sidebar-closed .page-sidebar-menu > li.active:hover > a {
    background: linear-gradient(135deg, #f97316, #f59e0b) !important;
    border-radius: 8px;
}

.page-sidebar-closed .page-sidebar-menu > li.active:hover > a i {
    color: #fff !important;
}

/* Sidebar search */
.page-sidebar .sidebar-search-menu .search-form {
    padding: 8px 14px;
}

.page-sidebar .sidebar-search-menu .search-form input {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    font-size: 12px;
    background: #f9fafb;
    width: 100%;
}

/* Sidebar toggler wrapper */
.sidebar-toggler-wrapper {
    padding: 0;
    margin: 0;
    list-style: none;
}

.sidebar-toggler-wrapper .logo {
    padding: 4px 14px 8px;
    text-align: center;
}

.sidebar-toggler-wrapper .logo img {
    max-height: 32px;
    width: auto;
}

.sidebar-toggler-wrapper .logo a {
    display: block;
}

/* Sidebar toggler */
.sidebar-toggler {
    background: #f3f4f6 !important;
    border-radius: 8px;
    margin: 8px 10px 4px;
    height: 24px;
    transition: background 0.2s ease;
}

.sidebar-toggler:hover {
    background: #e5e7eb !important;
}

/* Closed state: hide logo */
.page-sidebar-closed .sidebar-toggler-wrapper .logo {
    display: none;
}

/* Floating back button on info pages */
/* Treetable connector lines */
/* Full treetable base styles (replaces jquery-treetable.css) */
.tt-table div.tt {
    display: inline-block;
    position: relative;
}
.tt-table div.tt div.content {
    border: 1px #d1d5db solid;
    border-radius: 6px;
    z-index: 10;
    padding: 0;
    position: relative;
    background-color: #e5e7eb;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    top: 2px;
}
.tt-table div.tt div.tail {
    border: 1px #d1d5db solid;
    border-right: 0;
    border-top: 0;
    position: absolute;
    border-radius: 2px;
    bottom: 3px;
    left: -10px;
    z-index: 1;
}
html[dir='rtl'] .tt-table div.tt div.tail {
    border-right: 2px #d1d5db solid;
    border-left: 0;
}
.tt-table div.tt-parent div.content {
    background-color: #feb704;
    border-color: #f59e0b;
}
.tt-content-padding {
    display: inline-block;
    margin-right: 2px;
}

/* Floating sidebar toggle on the right edge (always visible) */
.page-sidebar-toggle {
    position: fixed;
    top: 90px;
    left: 228px;
    z-index: 1021;
    width: 16px;
    height: 52px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: left 0.25s ease, background 0.2s ease;
    box-shadow: 2px 0 6px rgba(0,0,0,0.05);
    box-sizing: content-box;
}

.page-sidebar-toggle:hover {
    background: #fef3c7;
    border-color: #fcd34d;
}

.page-sidebar-toggle i {
    font-size: 11px;
    color: #9ca3af;
    transition: transform 0.25s ease, color 0.2s ease;
}

.page-sidebar-toggle:hover i {
    color: #f97316;
}

/* When sidebar is closed, toggle shifts left and arrow flips */
body.page-sidebar-closed .page-sidebar-toggle {
    left: 33px;
}

body.page-sidebar-closed .page-sidebar-toggle i {
    transform: rotate(180deg);
}

/* Hide the old sidebar toggler button (replaced by floating toggle) */
.sidebar-toggler-wrapper .sidebar-toggler {
    display: none;
}

@media (max-width: 991px) {
    .page-sidebar-toggle {
        display: none;
    }
    .sidebar-toggler-wrapper .sidebar-toggler {
        display: block;
    }
}



/*=========================================================
    FOOTER
=========================================================*/
.footer {
    background: #fff !important;
    border-top: 1px solid var(--border);
    padding: 18px 28px;
    color: var(--muted);
    font-size: 13px;
}

/*=========================================================
    FILTERS PANEL
=========================================================*/
.filters-panel {
    background: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}

.filters-panel .form-control {
    height: 40px;
}

/*=========================================================
    LISTING CONTROLS
=========================================================*/
.listing-types {
    display: flex;
    gap: 4px;
    background: #f0f2f5;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.listing-types a {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.listing-types a.active {
    background: #fff;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.listing-types a:hover {
    color: var(--primary);
}

/*=========================================================
    GRID & MOBILE LISTING
=========================================================*/
ul.listing-grid {
    gap: 18px;
}

ul.listing-grid > li {
    background: #fff;
    border: none !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

ul.listing-grid > li:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

ul.listing-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 4px;
}
ul.listing-mobile > li {
    background: #fff;
    border: none !important;
    border-radius: 14px;
    margin: 0 0 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    animation: mobFadeIn 0.35s ease both;
}
ul.listing-mobile > li:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}
ul.listing-mobile > li:active {
    transform: scale(0.98);
}
ul.listing-mobile > li table {
    table-layout: fixed;
}
ul.listing-mobile .listing-section-heading {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #889098;
    padding: 10px 14px 2px;
}
ul.listing-mobile .listing-section-table {
    margin: 2px 0;
}
ul.listing-mobile .listing-section-table th {
    font-weight: 500;
    color: #889098;
    font-size: 12px;
    padding: 3px 14px;
    width: 35%;
    white-space: nowrap;
}
ul.listing-mobile .listing-section-table td {
    padding: 3px 14px;
    font-size: 13px;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
ul.listing-mobile .listing-section-table td.with_th {
    padding: 3px 14px 3px 0;
}
ul.listing-mobile .listing-section-table tr:last-child th,
ul.listing-mobile .listing-section-table tr:last-child td {
    padding-bottom: 8px;
}
ul.listing-mobile td.listing-section-align-center {
    text-align: center;
}
@keyframes mobFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.list-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    padding: 8px 12px;
    margin: 0 0 10px 0;
    scrollbar-width: none;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    list-style: none;
}
.list-inline::-webkit-scrollbar { display: none; }
.list-inline > li { float: none; white-space: nowrap; flex-shrink: 0; overflow: hidden; }
.list-inline > li [style*="background"] { display: inline-block; vertical-align: middle; }
.list-inline > li:last-child { margin-right: 0; }

/*=========================================================
    HORIZONTAL FILTERS PANELS
=========================================================*/
.horizontal-filters-panels .list-inline > li {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    overflow: visible;
}
.horizontal-filters-panels .list-inline > li .heading {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.horizontal-filters-panels .list-inline > li br { display: none; }

@media (max-width: 767px) {
    .horizontal-filters-panels {
        margin: 0 -12px;
        padding: 0 12px;
    }
    .horizontal-filters-panels .list-inline {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        padding: 6px 0;
        margin: 0;
        gap: 4px;
        background: none;
        border-radius: 0;
    }
    .horizontal-filters-panels .list-inline::-webkit-scrollbar { display: none; }
    .horizontal-filters-panels .list-inline > li {
        display: flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
        flex-shrink: 0;
        overflow: visible;
        font-size: 11px;
        padding: 4px 8px;
        background: #f5f5f5;
        border-radius: 6px;
        border: 1px solid #e0e0e0;
    }
    .horizontal-filters-panels .list-inline > li .heading {
        font-size: 10px;
        gap: 2px;
    }
    .horizontal-filters-panels .list-inline > li .heading a { font-size: 10px; }
    .horizontal-filters-panels .list-inline > li select,
    .horizontal-filters-panels .list-inline > li input {
        height: 24px;
        font-size: 11px;
        padding: 0 4px;
        max-width: 120px;
    }
    .horizontal-filters-panels .list-inline > li .btn {
        font-size: 11px;
        padding: 3px 8px;
        height: 24px;
        line-height: 1.4;
    }
    .horizontal-filters-panels .list-inline > li .select2-container .select2-choice {
        height: 24px;
        line-height: 24px;
        font-size: 11px;
    }
    .horizontal-filters-panels .list-inline > li .select2-container {
        min-width: 80px;
        max-width: 140px;
    }
    body.dark-mode .horizontal-filters-panels .list-inline > li {
        background: var(--card);
        border-color: var(--border);
    }
}

.listing-mobile .list-inline {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    padding: 6px 0;
    margin: 0;
    scrollbar-width: none;
    -webkit-transform: translateZ(0);
}

.listing-mobile .list-inline::-webkit-scrollbar {
    display: none;
}

.listing-mobile .list-inline > li {
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
    padding: 0 12px;
    border-right: 1px solid var(--border);
    line-height: 1.4;
}

.listing-mobile .list-inline > li:last-child {
    border-right: none;
}

/*=========================================================
    NAVBAR ITEMS (Top Second Nav)
=========================================================*/
.navbar-items {
    background: #fff !important;
    border: none !important;
    border-bottom: 1px solid #e8eaed;
    padding: 0;
    min-height: 48px;
    box-shadow: none;
}

.navbar-items .navbar-collapse {
    display: flex;
    align-items: center;
    padding: 0;
    min-height: 48px;
}

.navbar-items .navbar-nav {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 1;
}

.navbar-items .navbar-nav > li > a {
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 500;
    font-size: 14px;
    color: #64748b;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    position: relative;
    height: 48px;
}

.navbar-items .navbar-nav > li > a:hover {
    background: rgba(91,106,191,0.06);
    color: #1e293b;
}

.navbar-items .navbar-nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    transition: all 0.25s ease;
    opacity: 0;
}

.navbar-items .navbar-nav > li.active > a,
.navbar-items .navbar-nav > li.selected > a {
    color: var(--primary);
    background: transparent;
}

.navbar-items .navbar-nav > li.active > a::after,
.navbar-items .navbar-nav > li.selected > a::after {
    left: 12px;
    right: 12px;
    opacity: 1;
}

.navbar-items .navbar-nav > li > a i {
    margin-right: 8px;
    font-size: 16px;
}

/* Navbar brand link */
.navbar-items .navbar-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    height: 48px;
    line-height: 1;
}

.navbar-items .navbar-brand.selected {
    color: var(--primary);
}

/* Override Bootstrap defaults */
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    background: transparent;
}

/* Navbar toggle (hamburger) – improved */
.navbar-toggle {
    border: none !important;
    border-radius: 10px !important;
    margin: 5px 6px !important;
    padding: 7px 9px !important;
    background: var(--btn-primary-gradient) !important;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.25) !important;
    transition: all 0.25s ease;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggle:hover,
.navbar-toggle:focus {
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35) !important;
    transform: translateY(-1px);
}

.navbar-toggle .icon-bar,
.navbar-toggle .fa-bar {
    display: block;
    width: 18px;
    height: 2.5px;
    border-radius: 2px;
    background: #fff !important;
    margin: 3.5px 0;
    transition: width 0.2s ease;
}

.navbar-toggle:hover .icon-bar,
.navbar-toggle:hover .fa-bar {
    width: 20px;
}

.navbar-toggle .icon-bar + .icon-bar,
.navbar-toggle .fa-bar + .fa-bar {
    margin-top: 3.5px;
}



/*=========================================================
    KANBAN
=========================================================*/
.kanban-group,
.kanban-column {
    background: #f4f5f8;
    border-radius: var(--radius);
    padding: 14px;
}

.kanban-item {
    background: #fff;
    border: none !important;
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/*=========================================================
    CALENDAR
=========================================================*/
.fc {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.fc-toolbar {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: #edf2f7;
}

.fc-day-today {
    background: var(--primary-light) !important;
}

/*=========================================================
    HIGHCHARTS
=========================================================*/
.highcharts-background {
    fill: #ffffff;
}

.highcharts-title {
    fill: var(--text) !important;
}

.highcharts-axis-labels text {
    fill: var(--muted) !important;
}

/*=========================================================
    LOGIN PAGE
=========================================================*/
@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-page-logo {
    margin-bottom: 32px;
    text-align: center;
}

.login-page-logo img {
    max-height: 64px;
    width: auto;
}

.login .content {
    animation: loginFadeIn 0.5s ease-out;
    background: #fff;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 80px rgba(0,0,0,0.15);
    padding: 36px 36px 28px;
    width: 400px;
    max-width: 100%;
    margin: 0;
}

.login .content .form-title,
.login .content h3,
.login .content h4 {
    font-size: 22px;
    margin: 0 0 6px;
    color: var(--text);
    font-weight: 700;
}

.login .content p {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 20px;
    line-height: 1.5;
}

.login .form-group {
    margin-bottom: 18px;
}

.login .form-group .input-icon {
    position: relative;
}

.login .form-group .input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 16px;
    z-index: 2;
    pointer-events: none;
    margin: 0;
    display: block;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 1;
}

.login .form-group input.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    font-size: 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    box-sizing: border-box;
}

.login .form-group input.form-control:focus {
    border-color: #FEB704;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(254,183,4,0.12);
}

.login .form-group input.form-control::placeholder {
    color: #94a3b8;
}

.login .form-group .control-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.login .form-group .help-block {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.login .content .form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 16px;
    padding: 0;
    background: none;
    border: none;
    gap: 12px;
}

.login .content .form-actions label.checkbox {
    margin: 0;
    font-size: 14px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.login .content .form-actions label.checkbox input[type="checkbox"] {
    accent-color: #FEB704;
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.login .content .form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.login .content .form-actions .btn-info {
    background: #FEB704;
    color: #1e293b;
}

.login .content .form-actions .btn-info:hover {
    background: #e5a503;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(254,183,4,0.35);
}

.login .content .forget-password {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.login .content .forget-password p {
    margin: 0;
}

.login .content .forget-password a {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.login .content .forget-password a:hover {
    color: #FEB704;
}

.login .content .forget-password .btn-registration {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #FEB704;
    border-radius: var(--radius-sm);
    color: #FEB704;
    background: transparent;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 12px;
    float: none !important;
}

.login .content .forget-password .btn-registration:hover {
    background: #FEB704;
    color: #1e293b;
}

.login .content .create-account {
    text-align: center;
    margin-top: 12px;
    border: none;
    padding: 0;
}

.login .content .create-account p {
    margin: 0;
}

.login .content .create-account a {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.login .content .create-account a:hover {
    color: #FEB704;
}

.login .content .alert {
    padding: 14px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.login .content .alert-danger {
    background: #fef2f2;
    color: #dc2626;
}

.login .content .alert-success {
    background: #f0fdf4;
    color: #16a34a;
}

.login .content .alert-warning {
    background: #fffbeb;
    color: #d97706;
}

.login .content .alert-info {
    background: #eff6ff;
    color: #2563eb;
}

.login .content .login-form {
    padding: 0;
    margin: 0;
}

.login .content .social-login {
    text-align: center;
    margin-top: 16px;
}

.login .content .social-login .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.login .content .social-login .btn-default {
    background: #f1f5f9;
    color: var(--text);
}

.login .content .social-login .btn-default:hover {
    background: #e2e8f0;
}

.login .content .has-error .help-block {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
}

.login .content .has-error input.form-control {
    border-color: #dc2626;
    background: #fef2f2;
}

.login .content .has-error input.form-control:focus {
    box-shadow: 0 0 0 4px rgba(220,38,38,0.1);
}

.login .content .has-error .input-icon i {
    color: #dc2626;
}

.login .content .select2-container {
    width: 100% !important;
}

.login .content .select2-container .select2-choice {
    height: 48px;
    line-height: 48px;
    padding: 0 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    font-size: 14px;
}

.login .content .select2-container .select2-choice .select2-arrow {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.login .content .select2-container .select2-choice i {
    color: var(--muted);
}

.login .copyright {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    z-index: 10;
    pointer-events: none;
}

.login .copyright a {
    pointer-events: auto;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}

.login .copyright a:hover {
    color: #FEB704;
}

/*=========================================================
    SCROLLBAR
=========================================================*/
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #cdd1d9;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8aeb8;
}

::-webkit-scrollbar-track {
    background: #f0f2f5;
}

.table-scrollable::-webkit-scrollbar {
    height: 8px;
}

.table-scrollable::-webkit-scrollbar-thumb {
    background: #cdd1d9;
    border-radius: 999px;
}

.table-scrollable::-webkit-scrollbar-track {
    background: #f4f5f8;
}

/*=========================================================
    SELECTION
=========================================================*/
::selection {
    background: var(--primary);
    color: #fff;
}

/*=========================================================
    TOOLTIP
=========================================================*/
.tooltip-inner {
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
}

/*=========================================================
    POPOVER
=========================================================*/
.popover {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.popover-title {
    background: #fafbfc;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--text);
}

/*=========================================================
    FIELDSET
=========================================================*/
fieldset {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}

legend {
    width: auto;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    border: none;
}

/*=========================================================
    FORM SECTION
=========================================================*/
.form-section {
    color: var(--text) !important;
    font-size: 17px;
    font-weight: 700;
    border: none;
    margin-bottom: 18px;
}

/*=========================================================
    NOTIFICATIONS / DROPDOWN EXTENDED
=========================================================*/
.dropdown-menu.extended {
    border: none !important;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
}

.dropdown-menu.extended li p {
    background: #fafbfc;
    color: var(--text);
    font-weight: 700;
    padding: 16px;
    margin: 0;
}

.dropdown-menu.extended li a:hover {
    background: #f8faff;
}

/*=========================================================
    GANTT
=========================================================*/
.gantt-control {
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.gantt-control:hover {
    background: #f8faff;
}

/*=========================================================
    TIMELINE
=========================================================*/
.timeline-frame {
    border: none !important;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/*=========================================================
    PIVOT TABLE
=========================================================*/
#wdr-toolbar {
    background: #fff !important;
    border-bottom: 1px solid var(--border);
}

#wdr-pivot-view {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/*=========================================================
    CHAT
=========================================================*/
.chats li .message {
    border: none !important;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.chats li.out .message {
    background: var(--primary-light) !important;
}

.chats li.in .message {
    background: #fff !important;
}

/*=========================================================
    ATTACHMENTS
=========================================================*/
.attachments-gallery .gallery-image {
    border: none !important;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.attachments-gallery .gallery-image:hover {
    transform: scale(1.02);
}

/*=========================================================
    PORTLET BODY ACTIONS
=========================================================*/
.portlet-body-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin: 0 0 16px 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    min-height: 48px;
}

.portlet-body-actions .portlet-body-actions-left,
.portlet-body-actions .portlet-body-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.portlet-body-actions .btn,
.portlet-body-actions .btn-group .btn {
    white-space: nowrap;
    border-radius: 8px;
    font-size: 13px;
    padding: 7px 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.portlet-body-actions .btn:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.portlet-body-actions .btn:active {
    transform: translateY(0);
    box-shadow: none;
}



/*=========================================================
    SCROLLABLE MENUS & BUTTONS
=========================================================*/
.mym-scroll-wrap {
    position: relative;
    overflow: hidden;
}

.mym-scroll-wrap::before,
.mym-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 6px;
    width: 20px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mym-scroll-wrap::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.9), transparent);
}

.mym-scroll-wrap::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
}

.mym-scroll-wrap.mym-has-scroll.mym-scroll-start::before {
    opacity: 0;
}

.mym-scroll-wrap.mym-has-scroll::after {
    opacity: 1;
}

.mym-scroll-wrap.mym-scroll-end::after {
    opacity: 0;
}

.mym-scroll-wrap.mym-scrolling::after,
.mym-scroll-wrap.mym-scrolling::before {
    opacity: 0 !important;
    transition: none;
}

/* Listing action buttons base */
.entitly-listing-buttons-left,
.entitly-listing-buttons-right,
.entitly-listing-buttons-right1,
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.entitly-listing-buttons-left > .btn,
.entitly-listing-buttons-right > .btn,
.entitly-listing-buttons-right1 > .btn,
.entitly-listing-buttons-left > .btn-group,
.entitly-listing-buttons-right > .btn-group,
.entitly-listing-buttons-right1 > .btn-group,
.table-toolbar > .btn,
.table-toolbar > .btn-group {
    flex-shrink: 0;
}

/* entitly-listing-buttons-right1 */
.entitly-listing-buttons-right1 > .btn,
.entitly-listing-buttons-right1 > .btn-group > .btn {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--muted);
    min-height: 38px;
    height: 38px;
    padding: 7px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.entitly-listing-buttons-right1 > .btn:hover,
.entitly-listing-buttons-right1 > .btn-group > .btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

/*=========================================================
    LOADING STATE
=========================================================*/
.loading {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.1);
}

/*=========================================================
    RESPONSIVE
=========================================================*/

/* Medium Desktop (992px - 1200px) */
@media (min-width: 992px) and (max-width: 1200px) {
    .header .dropdown .username {
        display: none;
    }

    .stat-block .number,
    .stats-default .number {
        font-size: 28px;
    }

    .stat-block .percent,
    .stats-default .percent {
        font-size: 32px !important;
    }
}

/* Tablet & Mobile (≤991px) */
@media (max-width: 991px) {
    .page-content {
        margin: 0 !important;
        padding: 18px !important;
    }
    .mym-counter-ticker {
        left: 0 !important;
    }
    .mym-nav-bar {
        left: 0 !important;
    }

    .portlet > .portlet-title {
        padding: 0 18px;
        min-height: 48px;
    }

    .portlet > .portlet-title > .caption {
        font-size: 14px;
    }

    .portlet > .portlet-title > .caption > i {
        font-size: 15px;
        width: 16px;
    }

    .portlet > .portlet-body {
        padding: 18px;
    }

    .table thead tr th,
    .table tbody tr td {
        padding: 12px 14px;
    }

    .btn {
        min-height: 40px;
        padding: 8px 18px;
    }

    .stat-block,
    .stats-default {
        padding: 18px 20px;
    }

    .page-title {
        font-size: 22px;
    }

    .header .search-form {
        display: none;
    }

    .page-sidebar .sidebar-search-menu .search-form {
        display: block;
    }

    .page-sidebar {
        background: #fff !important;
        border-right: none;
        box-shadow: none;
        width: 260px !important;
        padding: 0;
        position: fixed !important;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: block !important;
    }

    body.mym-sidebar-open .page-sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }

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

    body.mym-sidebar-open .mym-sidebar-overlay {
        display: block;
    }

    html[dir='rtl'] .page-sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
        border-left: none;
    }
    html[dir='rtl'] body.mym-sidebar-open .page-sidebar {
        transform: translateX(0);
    }

    .navbar-items {
        min-height: 42px;
    }
    .navbar-items .navbar-collapse {
        min-height: 42px;
    }
    .navbar-items .navbar-nav > li > a {
        padding: 0 12px;
        font-size: 12px;
        height: 42px;
    }
    .navbar-items .navbar-brand {
        height: 42px;
        padding: 0 10px;
        font-size: 13px;
    }

    .dropdown-menu.extended {
        max-width: 300px;
    }
}

/* Small Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .stat-block .number,
    .stats-default .number {
        font-size: 26px;
    }
}

/* Mobile Login: full screen */
@media (max-width: 480px) {
    .login {
        padding: 0;
        padding-top: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .login-page-logo {
        margin-bottom: 0;
        padding: 40px 20px 20px;
    }

    .login-page-logo img {
        max-height: 40px;
    }

    .login .content {
        padding: 20px 20px 16px;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .login .content .form-actions {
        margin-top: auto;
        padding-bottom: 12px;
    }

    .login .copyright {
        position: static;
        transform: none;
        padding: 12px 20px;
        font-size: 11px;
    }

    .login .form-group input.form-control {
        height: 50px;
        font-size: 16px;
    }
}

/* Mobile: 2-column compact counter grid */
@media (max-width: 767px) {
    div.row.stats-overview-cont {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    div.row.stats-overview-cont:before,
    div.row.stats-overview-cont:after {
        display: none !important;
        content: none !important;
    }

    div.row.stats-overview-cont > .reports_counter_container,
    div.row.stats-overview-cont > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        clear: none !important;
        flex: none !important;
    }

    .stat-block,
    .stats-default {
        padding: 10px 12px !important;
        border-radius: 10px;
        transform: none !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.02) !important;
    }

    .stat-block:hover,
    .stats-default:hover {
        transform: none !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.02) !important;
    }

    .stat-block > table,
    .stats-default > table {
        display: block !important;
        width: 100%;
    }

    .stat-block > table tbody,
    .stats-default > table tbody {
        display: block !important;
        width: 100%;
    }

    .stat-block > table tbody tr,
    .stats-default > table tbody tr {
        display: flex !important;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .stat-block > table tbody tr td,
    .stats-default > table tbody tr td {
        display: block !important;
        width: auto !important;
        border: none !important;
        padding: 0 !important;
    }

    .stat-block > table tbody tr td:first-child,
    .stats-default > table tbody tr td:first-child {
        flex-shrink: 0;
    }

    .stat-block > table tbody tr td:last-child,
    .stats-default > table tbody tr td:last-child {
        flex: 1;
        min-width: 0;
    }

    .stat-block table table,
    .stats-default table table {
        display: inline-flex !important;
        align-items: baseline;
        gap: 4px;
    }

    .stat-block table table tbody,
    .stats-default table table tbody {
        display: inline-flex !important;
        align-items: baseline;
        gap: 4px;
    }

    .stat-block table table tr,
    .stats-default table table tr {
        display: inline-flex !important;
        align-items: baseline;
        gap: 4px;
    }

    .stat-block table table td,
    .stats-default table table td {
        display: block !important;
        width: auto !important;
        padding: 0 !important;
        border: none !important;
    }

    .stat-block .display.stat,
    .stats-default .display.stat {
        display: inline-flex !important;
    }

    .stat-block .percent,
    .stats-default .percent {
        font-size: 18px !important;
        font-weight: 700 !important;
    }

    .stat-block .title,
    .stats-default .title {
        font-size: 9px;
        letter-spacing: 0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-block .details,
    .stats-default .details {
        margin-top: 2px;
    }

    .stat-block .totals,
    .stats-default .totals {
        display: none;
    }

    .stat-block i,
    .stats-default i {
        font-size: 16px;
    }

    .stat-block::after,
    .stats-default::after {
        display: none;
    }

    /* Breadcrumb on mobile */
    .page-content .page-breadcrumb {
        display: none !important;
    }
}

/* Check second 767 block for breadcrumb override */
@media (max-width: 480px) {
    .stats-overview-cont {
        gap: 6px;
    }

    .stat-block,
    .stats-default {
        padding: 8px 10px !important;
        border-radius: 8px;
    }

    .stat-block .percent,
    .stats-default .percent {
        font-size: 16px !important;
    }

    .stat-block .title,
    .stats-default .title {
        font-size: 8px;
    }

    .stat-block i,
    .stats-default i {
        font-size: 14px;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .page-content {
        padding: 14px 10px !important;
    }

    .page-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .portlet > .portlet-title {
        padding: 0 16px;
        min-height: 48px;
    }

    .portlet > .portlet-title > .caption {
        font-size: 14px;
    }

    .portlet > .portlet-title > .caption > i {
        font-size: 14px;
        width: 14px;
    }

    .portlet > .portlet-title > .caption::before {
        height: 16px;
    }

    .portlet > .portlet-body {
        padding: 16px;
    }

    .table thead tr th,
    .table tbody tr td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .btn {
        min-height: 38px;
        padding: 7px 14px;
        font-size: 13px;
    }

    .form-control {
        height: 42px;
        font-size: 13px;
    }

    .select2-container--default .select2-selection--single {
        height: 42px;
    }

    .select2-container .select2-selection--single {
        height: 42px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 42px;
    }

    .pagination > li > a,
    .pagination > li > span {
        min-width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .footer {
        padding: 14px 16px;
        font-size: 12px;
    }

    .table-item-details th {
        width: 120px;
        font-size: 12px;
        padding: 10px 12px;
    }

    .table-item-details td {
        font-size: 13px;
        padding: 10px 12px;
    }

    .header .navbar-brand {
        font-size: 16px;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .login {
        padding: 0;
        justify-content: flex-start;
        padding-top: 40px;
    }

    .login .content {
        padding: 24px;
        width: 100%;
        max-width: 420px;
        border-radius: var(--radius);
        box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    }

    .login-page-logo img {
        max-height: 44px;
    }

    .navbar-items .navbar-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .navbar-items .navbar-nav::-webkit-scrollbar {
        display: none;
    }

    .navbar-items .navbar-nav > li > a {
        padding: 0 12px;
        font-size: 13px;
        white-space: nowrap;
        height: 44px;
    }
    .navbar-items .navbar-collapse {
        min-height: 44px;
    }
    .navbar-items .navbar-brand {
        height: 44px;
        padding: 0 10px;
        font-size: 13px;
    }
    .navbar-items .navbar-nav > li.active > a::after,
    .navbar-items .navbar-nav > li.selected > a::after {
        left: 8px;
        right: 8px;
    }

    .filters-panel {
        padding: 14px;
    }

    .page-sidebar-menu {
        padding: 12px 10px;
    }

    .page-sidebar-menu > li > a {
        padding: 10px 14px;
        font-size: 13px;
    }

    .modal-content {
        border-radius: var(--radius);
        margin: 10px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 14px 20px;
    }

    .modal-title {
        font-size: 17px;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs > li > a {
        padding: 8px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Stages / multi-step indicator mobile */
    .cd-multi-steps {
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        scrollbar-width: thin;
        padding: 0.5em 0.5em;
    }

    .cd-multi-steps li {
        float: none;
        flex-shrink: 0;
        margin: 0 0.3em;
        white-space: nowrap;
    }

    .cd-multi-steps li::after {
        margin: 0 0.2em;
    }

    .cd-multi-steps li > * {
        font-size: 13px;
    }

    /* Scrollable action bars */
    .entitly-listing-buttons-left,
    .entitly-listing-buttons-right,
    .entitly-listing-buttons-right1,
    .table-toolbar,
    .portlet > .portlet-title > .actions,
    .portlet-body-actions {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        gap: 6px;
        padding-bottom: 6px;
    }

    .portlet-body-actions {
        justify-content: flex-start;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 10px 14px;
        margin: 0 0 12px 0;
        position: relative;
        gap: 8px;
    }

    .portlet-body-actions::after {
        content: '';
        position: sticky;
        right: 0;
        width: 24px;
        min-width: 24px;
        height: 100%;
        background: linear-gradient(to right, transparent, #fff);
        pointer-events: none;
        flex-shrink: 0;
        margin-right: -14px;
    }

    .portlet-body-actions::-webkit-scrollbar {
        height: 4px;
    }

    .portlet-body-actions::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 999px;
    }

    .portlet-body-actions .btn,
    .portlet-body-actions .btn-group .btn {
        font-size: 12px;
        padding: 8px 14px;
        border-radius: 9px;
    }

    .entitly-listing-buttons-left::-webkit-scrollbar,
    .entitly-listing-buttons-right::-webkit-scrollbar,
    .entitly-listing-buttons-right1::-webkit-scrollbar,
    .table-toolbar::-webkit-scrollbar,
    .portlet > .portlet-title > .actions::-webkit-scrollbar {
        height: 4px;
    }

    .entitly-listing-buttons-left::-webkit-scrollbar-thumb,
    .entitly-listing-buttons-right::-webkit-scrollbar-thumb,
    .entitly-listing-buttons-right1::-webkit-scrollbar-thumb,
    .table-toolbar::-webkit-scrollbar-thumb,
    .portlet > .portlet-title > .actions::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 999px;
    }

    .entitly-listing-buttons-left > .btn,
    .entitly-listing-buttons-right > .btn,
    .entitly-listing-buttons-right1 > .btn,
    .entitly-listing-buttons-left > .btn-group,
    .entitly-listing-buttons-right > .btn-group,
    .entitly-listing-buttons-right1 > .btn-group,
    .table-toolbar > .btn,
    .table-toolbar > .btn-group,
    .portlet > .portlet-title > .actions > .btn,
    .portlet > .portlet-title > .actions > .btn-group,
    .portlet-body-actions > .btn,
    .portlet-body-actions > .btn-group {
        flex-shrink: 0;
    }

    .listing-types {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 4px;
    }

    .listing-types a {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .entitly-listing-buttons-left .btn-group > .dropdown-menu,
    .entitly-listing-buttons-right .btn-group > .dropdown-menu,
    .entitly-listing-buttons-right1 .btn-group > .dropdown-menu {
        position: fixed;
        top: auto;
        left: auto;
        z-index: 9999;
    }

    /* Search form inside action bars on mobile */
    .entitly-listing-buttons-right .navbar-search {
        width: 100%;
    }

    .entitly-listing-buttons-right .input-group.input-small {
        width: 100%;
        max-width: 260px;
    }

    .entitly-listing-buttons-right .input-group.input-small input {
        min-width: 120px;
    }

    .entitly-listing-buttons-right .input-group-btn .btn {
        padding: 6px 12px;
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .page-content {
        padding: 10px 8px !important;
    }

    .page-title {
        font-size: 18px;
    }

    .portlet > .portlet-title {
        padding: 0 14px;
        min-height: 44px;
    }

    .portlet > .portlet-title > .caption {
        font-size: 13px;
    }

    .portlet > .portlet-title > .caption > i {
        font-size: 13px;
        width: 13px;
    }

    .portlet > .portlet-title > .caption::before {
        height: 14px;
    }

    .portlet > .portlet-body {
        padding: 12px 14px;
    }

    .portlet {
        border-radius: var(--radius);
        margin-bottom: 18px;
    }

    .table-scrollable {
        border-radius: var(--radius);
    }

    .table thead tr th {
        font-size: 11px;
        padding: 8px 10px;
    }

    .table tbody tr td {
        font-size: 12px;
        padding: 8px 10px;
    }

    .btn {
        min-height: 36px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .btn-group .btn {
        margin-right: 2px;
    }

    .form-control {
        height: 38px;
        font-size: 13px;
    }

    .header .navbar-nav > li > a {
        padding: 12px 10px;
        font-size: 12px;
    }

    .header .navbar-brand {
        font-size: 14px;
        max-width: 150px;
    }

    .hidden-480 {
        display: none !important;
    }

    .page-sidebar-menu {
        padding: 8px 6px;
    }
}

/* Small Mobile (≤480px) - scrollable buttons & menus */
@media (max-width: 480px) {
    .entitly-listing-buttons-left > .btn,
    .entitly-listing-buttons-right > .btn,
    .entitly-listing-buttons-right1 > .btn,
    .entitly-listing-buttons-left > .btn-group,
    .entitly-listing-buttons-right > .btn-group,
    .entitly-listing-buttons-right1 > .btn-group,
    .table-toolbar > .btn,
    .table-toolbar > .btn-group,
    .portlet > .portlet-title > .actions > .btn,
    .portlet > .portlet-title > .actions > .btn-group {
        flex-shrink: 0;
    }

    .entitly-listing-buttons-right .input-group.input-small {
        max-width: 100%;
    }

    .page-sidebar-menu > li > a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .page-sidebar-menu > li > a i {
        font-size: 14px;
        width: 20px;
    }
}

/* Very Small Mobile (≤320px) */
@media (max-width: 320px) {
    .header .navbar-nav > li > a {
        padding: 10px 8px;
        font-size: 11px;
    }

    .header .navbar-brand {
        max-width: 120px;
        font-size: 13px;
    }

    .page-title {
        font-size: 16px;
    }

    .hidden-320 {
        display: none;
    }
}

/*=========================================================
    NOTIFICATION BADGE ANIMATION
=========================================================*/
@keyframes mym-badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.badge.mym-pulse {
    animation: mym-badge-pulse 0.4s ease 2;
}

.badge.mym-pulse-once {
    animation: mym-badge-pulse 0.4s ease 1;
}

/* Counter flash animation (new values on page load) */
@keyframes mym-counter-flash {
    0%   { background-color: rgba(91, 106, 191, 0.15); transform: scale(1); }
    15%  { background-color: rgba(91, 106, 191, 0.25); transform: scale(1.15); }
    40%  { background-color: rgba(91, 106, 191, 0.12); transform: scale(1.05); }
    70%  { background-color: rgba(91, 106, 191, 0.05); transform: scale(1); }
    100% { background-color: transparent; transform: scale(1); }
}

.mym-counter-flash {
    animation: mym-counter-flash 2.8s ease-out forwards;
    border-radius: var(--radius-sm);
}



/* Notification sound toggle */
.mym-notif-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.mym-notif-toggle.muted {
    opacity: 0.4;
}

/*=========================================================
    MOBILE BOTTOM NAV (≤767px)
=========================================================*/
@media (max-width: 767px) {
    .mym-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        background: var(--card);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        padding: 0 env(safe-area-inset-bottom, 0);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    .mym-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 6px 4px 8px;
        color: var(--muted);
        font-size: 9px;
        text-decoration: none;
        transition: color 0.2s ease;
        gap: 2px;
        min-height: 48px;
        position: relative;
    }

    .mym-bottom-nav-item i {
        font-size: 18px;
        transition: transform 0.2s ease;
    }

    .mym-bottom-nav-item:active i {
        transform: scale(0.85);
    }

    .mym-bottom-nav-item.active,
    .mym-bottom-nav-item:hover {
        color: var(--primary);
    }

    .mym-bottom-nav-item .badge {
        position: absolute;
        top: 2px;
        right: 50%;
        margin-right: -14px;
        font-size: 9px;
        padding: 2px 5px;
        min-width: 16px;
        height: 16px;
        line-height: 12px;
        border-radius: 999px;
    }

    /* Push content up to make room for bottom nav */
    body {
        padding-bottom: 56px;
    }

    .footer {
        margin-bottom: 56px;
    }

    /* Hide bottom nav on scroll down, show on scroll up */
    .mym-bottom-nav.mym-nav-hidden {
        transform: translateY(100%);
    }

    .mym-bottom-nav {
        transition: transform 0.3s ease;
    }
}

@media (max-width: 480px) {
    .mym-bottom-nav-item {
        font-size: 8px;
        padding: 4px 2px 6px;
        min-height: 44px;
    }

    .mym-bottom-nav-item i {
        font-size: 16px;
    }

    body {
        padding-bottom: 52px;
    }

    .footer {
        margin-bottom: 52px;
    }
}

/*=========================================================
    COUNTER TICKER BAR – below header
=========================================================*/
.mym-counter-ticker {
    display: none;
    position: fixed;
    top: 45px;
    left: 0;
    right: 0;
    z-index: 1019;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    height: 50px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mym-counter-ticker::-webkit-scrollbar {
    display: none;
}

.mym-counter-ticker.dragging {
    cursor: grabbing;
}

@media (min-width: 768px) {
    .mym-counter-ticker {
        left: 230px;
    }
}

/* When sidebar is collapsed, expand ticker to fill space */
body.page-sidebar-closed .mym-counter-ticker {
    left: 35px;
}

@media (max-width: 767px) {
    .mym-counter-ticker {
        left: 0;
    }
}

.mym-counter-ticker.active {
    display: block;
}

.mym-counter-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 0;
    height: 50px;
}

.mym-counter-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px;
    font-size: 13px;
    font-weight: 500;
    line-height: 50px;
    white-space: nowrap;
    border-right: 1px solid #f0f0f0;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.mym-counter-ticker-item:active {
    background: #fef3c7;
}

.mym-counter-ticker-item .ticker-label {
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 11px;
}

.mym-counter-ticker-item .ticker-value {
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.3px;
    font-size: 14px;
}

/* Push page content down to make room for ticker – part of TICKER section */
body.mym-has-ticker {
    padding-top: 50px !important;
}

body.mym-has-ticker .page-sidebar {
    position: fixed !important;
    top: 45px !important;
    height: calc(100vh - 45px);
    overflow-y: auto;
    z-index: 1020;
}

body.mym-has-ticker .page-sidebar .page-sidebar-menu {
    padding-top: 6px;
}

@media (max-width: 991px) {
    .mym-counter-ticker {
        height: 44px;
    }
    .mym-counter-ticker-track {
        height: 44px;
    }
    .mym-counter-ticker-item {
        padding: 0 16px;
        line-height: 44px;
        font-size: 12px;
    }
    .mym-counter-ticker-item .ticker-label {
        font-size: 10px;
    }
    .mym-counter-ticker-item .ticker-value {
        font-size: 13px;
    }
    body.mym-has-ticker {
        padding-top: 44px !important;
    }
}

@media (max-width: 480px) {
    .mym-counter-ticker {
        height: 38px;
    }
    .mym-counter-ticker-track {
        height: 38px;
    }
    .mym-counter-ticker-item {
        padding: 0 14px;
        line-height: 38px;
        font-size: 11px;
    }
    .mym-counter-ticker-item .ticker-label {
        font-size: 9px;
        letter-spacing: 0.3px;
    }
    .mym-counter-ticker-item .ticker-value {
        font-size: 12px;
    }
    body.mym-has-ticker {
        padding-top: 38px !important;
    }
}
/* ===== END TICKER SECTION – remove from here up to the first TICKER header ===== */

/*=========================================================
    HORIZONTAL NAV BAR (sidebar clone below ticker)
=========================================================*/
.mym-nav-bar {
    display: none;
    position: fixed;
    top: 95px;
    left: 0;
    right: 0;
    z-index: 1018;
    background: #f8f9fc;
    border-bottom: 1px solid #e5e7eb;
    height: 48px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mym-nav-bar::-webkit-scrollbar {
    display: none;
}

.mym-nav-bar.dragging {
    cursor: grabbing;
}

@media (min-width: 768px) {
    .mym-nav-bar {
        left: 230px;
    }
}

/* When sidebar is collapsed, expand nav bar to fill space */
body.page-sidebar-closed .mym-nav-bar {
    left: 35px;
}

@media (max-width: 767px) {
    .mym-nav-bar {
        left: 0;
    }
}

.mym-nav-bar.active {
    display: block;
}

.mym-nav-bar-track {
    display: inline-flex;
    align-items: center;
    height: 48px;
    gap: 0;
}

.mym-nav-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    height: 48px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-right: 1px solid #f0f0f0;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s ease;
    color: inherit;
}

.mym-nav-bar-item:hover {
    background: #fff8e6;
}

.mym-nav-bar-item.active {
    border-bottom: 3px solid #FEB704;
    background: #fffbe8;
}

.mym-nav-bar-item i {
    font-size: 15px;
    vertical-align: middle;
}

.mym-nav-bar-item span {
    font-size: 12px;
    vertical-align: middle;
    color: #6b7280;
}

/* Content push when nav bar is present (sidebar unaffected — it's to the left) */
body.mym-has-ticker.mym-has-navbar {
    padding-top: 98px !important;
}

@media (max-width: 991px) {
    .mym-nav-bar {
        top: 89px;
        height: 44px;
    }
    .mym-nav-bar-track {
        height: 44px;
    }
    .mym-nav-bar-item {
        padding: 0 14px;
        height: 44px;
        font-size: 12px;
    }
    .mym-nav-bar-item span {
        font-size: 11px;
    }
    body.mym-has-ticker.mym-has-navbar {
        padding-top: 88px !important;
    }
}

@media (max-width: 480px) {
    .mym-nav-bar {
        top: 83px;
        height: 40px;
    }
    .mym-nav-bar-track {
        height: 40px;
    }
    .mym-nav-bar-item {
        padding: 0 12px;
        height: 40px;
        font-size: 11px;
    }
    .mym-nav-bar-item i {
        font-size: 13px;
    }
    .mym-nav-bar-item span {
        font-size: 10px;
    }
    body.mym-has-ticker.mym-has-navbar {
        padding-top: 78px !important;
    }
}

/* Hide fixed UI elements in print + prevent blank pages */
@media print {
    .mym-counter-ticker,
    .mym-nav-bar,
    .page-sidebar,
    .page-header,
    .page-footer {
        display: none !important;
    }
    body.mym-has-ticker {
        padding-top: 0 !important;
    }
    body.mym-has-ticker.mym-has-navbar {
        padding-top: 0 !important;
    }
    .page-container,
    .page-content-wrapper,
    .page-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    .report-page-body {
        margin: 0;
        padding: 0;
    }
}
/*=========================================================
    REDUCED MOTION
=========================================================*/
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/*=========================================================
    FUNNEL / HIGHCHARTS CONTAINER
=========================================================*/
.funnelchart {
    background: #fff !important;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    margin-bottom: 4px;
    transition: box-shadow 0.3s ease;
    position: relative;
}

.funnelchart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--btn-primary-gradient);
    border-radius: 16px 16px 0 0;
}

.funnelchart:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
}

/* Chart background */
.funnelchart .highcharts-background {
    fill: transparent;
}

.funnelchart .highcharts-plot-background {
    fill: transparent;
}

/* Grid lines - very subtle */
.funnelchart .highcharts-grid-line {
    stroke: #f0f2f5 !important;
    stroke-dasharray: 4 4;
    stroke-width: 1;
}

/* Axis lines */
.funnelchart .highcharts-axis-line {
    stroke: #e5e7eb !important;
    stroke-width: 1;
}

/* Tick marks */
.funnelchart .highcharts-tick {
    stroke: #e5e7eb !important;
}

/* Axis labels */
.funnelchart .highcharts-axis-labels text {
    fill: #9ca3af !important;
    font-size: 11px !important;
    font-family: inherit !important;
}

/* Title */
.funnelchart .highcharts-title {
    fill: #1f2937 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
}

/* Data labels (bar name: count) */
.funnelchart .highcharts-data-label text {
    font-size: 12px !important;
    font-family: inherit !important;
    fill: #374151 !important;
    font-weight: 500 !important;
}

.funnelchart .highcharts-data-label-box {
    fill: #f9fafb !important;
    stroke: #e5e7eb !important;
    stroke-width: 1 !important;
    rx: 6 !important;
    ry: 6 !important;
}

/* Bar points - modern rounded */
.funnelchart .highcharts-point {
    rx: 4;
    ry: 4;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.funnelchart .highcharts-point:hover {
    opacity: 1;
}

/* Tooltip */
.funnelchart .highcharts-tooltip-box {
    fill: #1f2937 !important;
    stroke: none !important;
    fill-opacity: 0.95;
    rx: 8;
    ry: 8;
}

.funnelchart .highcharts-tooltip text {
    fill: #fff !important;
    font-size: 12px !important;
    font-family: inherit !important;
}

.funnelchart .highcharts-tooltip .highcharts-strong {
    font-weight: 600 !important;
}

/* Context button */
.funnelchart .highcharts-button-box {
    fill: transparent !important;
    stroke: none !important;
}

.funnelchart .highcharts-button-symbol {
    stroke: #9ca3af !important;
}

/* Credit line */
.funnelchart .highcharts-credits {
    fill: #d1d5db !important;
    font-size: 10px !important;
}

/* Responsive */
@media (max-width: 767px) {
    .funnelchart {
        padding: 12px 14px;
        border-radius: var(--radius);
    }

    .funnelchart .highcharts-title {
        font-size: 13px !important;
    }

    .funnelchart .highcharts-data-label text {
        font-size: 10px !important;
    }

    .funnelchart .highcharts-axis-labels text {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .funnelchart {
        padding: 10px 12px;
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
    }

    .funnelchart::before {
        border-radius: 0;
    }

    .funnelchart .highcharts-data-label text {
        font-size: 9px !important;
    }
}

/*=========================================================
    UTILITY
=========================================================*/
.hr {
    border-top: 1px solid var(--border);
}

/*
 * LOADING SPINNER OVERRIDES
 * Equalizer wave bars
 */

.ajax-loading-small {
    width: 36px !important;
    height: 20px !important;
    background-image: linear-gradient(#888, #888), linear-gradient(#888, #888), linear-gradient(#888, #888), linear-gradient(#888, #888), linear-gradient(#888, #888) !important;
    background-repeat: no-repeat !important;
    background-position: 0 50%, 7px 50%, 14px 50%, 21px 50%, 28px 50% !important;
    background-size: 4px 30%, 4px 70%, 4px 100%, 4px 80%, 4px 50%;
    position: absolute !important;
    margin: auto !important;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: 1px !important;
    animation: mym-wave-5 0.9s ease-in-out infinite !important;
}

@keyframes mym-wave-5 {
    0%   { background-size: 4px 30%, 4px 70%, 4px 100%, 4px 80%, 4px 50%; }
    15%  { background-size: 4px 50%, 4px 30%, 4px 70%, 4px 100%, 4px 80%; }
    30%  { background-size: 4px 80%, 4px 50%, 4px 30%, 4px 70%, 4px 100%; }
    45%  { background-size: 4px 100%, 4px 80%, 4px 50%, 4px 30%, 4px 70%; }
    60%  { background-size: 4px 70%, 4px 100%, 4px 80%, 4px 50%, 4px 30%; }
    75%  { background-size: 4px 30%, 4px 70%, 4px 100%, 4px 80%, 4px 50%; }
    100% { background-size: 4px 30%, 4px 70%, 4px 100%, 4px 80%, 4px 50%; }
}

.data_listing_processing {
    background-image: linear-gradient(#888, #888), linear-gradient(#888, #888), linear-gradient(#888, #888), linear-gradient(#888, #888), linear-gradient(#888, #888) !important;
    background-repeat: no-repeat !important;
    background-position: 0 50%, 7px 50%, 14px 50%, 21px 50%, 28px 50% !important;
    background-size: 4px 30%, 4px 70%, 4px 100%, 4px 80%, 4px 50%;
    width: 36px !important;
    height: 20px !important;
    margin-left: -18px !important;
    margin-top: -10px !important;
    padding-top: 0 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    animation: mym-wave-5 0.9s ease-in-out infinite !important;
}

body.dark-mode .ajax-loading-small,
body.dark-mode .data_listing_processing {
    background-image: linear-gradient(#999, #999), linear-gradient(#999, #999), linear-gradient(#999, #999), linear-gradient(#999, #999), linear-gradient(#999, #999) !important;
}

/* Shared animation for overlays */
@keyframes mym-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/*=========================================================
    MOBILE BOTTOM SHEET (record popup)
=========================================================*/
@media (max-width: 767px) {
    .mym-sheet-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.35);
        z-index: 10040;
    }
    .mym-sheet-overlay.active {
        display: block;
        animation: mym-fade-in 0.2s ease;
    }
    .mym-sheet {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 80vh;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 30px rgba(0,0,0,0.12);
        z-index: 10041;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
        display: flex;
        flex-direction: column;
    }
    .mym-sheet.active {
        transform: translateY(0);
    }
    .mym-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        min-height: 44px;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
        overflow: hidden;
    }
    .mym-sheet-handle {
        width: 32px;
        height: 4px;
        background: #d0d5dd;
        border-radius: 2px;
        margin: 0 auto;
    }
    .mym-sheet-close {
        width: 30px;
        height: 30px;
        border: none;
        background: #f0f2f5;
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
        color: #555;
        padding: 0;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mym-sheet-close:hover {
        background: #e4e7ed;
    }
    .mym-sheet-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        -webkit-overflow-scrolling: touch;
    }
    .mym-sheet-body .page-breadcrumb,
    .mym-sheet-body .navbar-items {
        display: none;
    }
    .mym-sheet-body.loading {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    body.dark-mode .mym-sheet {
        background: #1e1e2a;
    }
    body.dark-mode .mym-sheet-header {
        border-color: #2d2d3d;
    }
    body.dark-mode .mym-sheet-close {
        background: #2d2d3d;
        color: #aaa;
    }
    body.dark-mode .mym-sheet-close:hover {
        background: #3d3d4d;
    }
    body.dark-mode .mym-sheet-handle {
        background: #3d3d4d;
    }
    .mym-sheet-footer {
        flex-shrink: 0;
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        border-top: 1px solid #e2e8f0;
        background: #fff;
        overflow: visible;
        position: relative;
    }
    .mym-sheet-footer:empty {
        display: none;
    }
    .mym-sheet-footer .prolet-body-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        border: none;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        min-height: 0;
    }
    .mym-sheet-footer .list-inline {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }
    .mym-sheet-footer .list-inline > li {
        overflow: visible;
    }
    .mym-sheet-footer .list-inline .btn {
        white-space: nowrap;
        border-radius: 8px;
        font-size: 13px;
        padding: 7px 14px;
        font-weight: 500;
    }
    .mym-sheet-footer .dropdown-menu {
        top: auto;
        bottom: 100%;
        margin-bottom: 4px;
    }
    body.dark-mode .mym-sheet-footer {
        background: #1e1e2a;
        border-color: #2d2d3d;
    }
    body.dark-mode .mym-sheet-footer .prolet-body-actions,
    body.dark-mode .mym-sheet-footer .portlet-body-actions {
        background: transparent;
    }
}

/*=========================================================
    DESKTOP SIDE PANEL (record popup, 50% width)
=========================================================*/
@media (min-width: 768px) {
    .mym-panel-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.35);
        z-index: 10050;
    }
    .mym-panel-overlay.active {
        display: block;
        animation: mym-fade-in 0.2s ease;
    }
    .mym-panel {
        position: fixed;
        top: 0;
        width: 50vw;
        height: 100vh;
        background: #fff;
        box-shadow: -4px 0 30px rgba(0,0,0,0.12);
        z-index: 10051;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    }
    /* Default (fallback): right side */
    .mym-panel {
        right: 0;
        transform: translateX(100%);
    }
    html[dir='rtl'] .mym-panel {
        left: 0;
        right: auto;
        transform: translateX(-100%);
    }
    html[dir='ltr'] .mym-panel {
        right: 0;
        left: auto;
        transform: translateX(100%);
    }
    /* JS-set class fallbacks (when html[dir] may not work) */
    .mym-panel-rtl {
        left: 0 !important;
        right: auto !important;
        transform: translateX(-100%) !important;
    }
    .mym-panel-ltr {
        right: 0 !important;
        left: auto !important;
        transform: translateX(100%) !important;
    }
    .mym-panel.active,
    html[dir='rtl'] .mym-panel.active,
    html[dir='ltr'] .mym-panel.active {
        transform: translateX(0);
    }
    .mym-panel-rtl.active,
    .mym-panel-ltr.active {
        transform: translateX(0) !important;
    }
    .mym-panel-header {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0 16px;
        min-height: 52px;
        border-bottom: 2px solid var(--border);
        flex-shrink: 0;
    }
    .mym-panel-close {
        width: 36px;
        height: 36px;
        border: none;
        background: #fee2e2;
        border-radius: 50%;
        font-size: 20px;
        font-weight: 700;
        cursor: pointer;
        color: #dc2626;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
    }
    .mym-panel-close:hover {
        background: #fecaca;
        transform: scale(1.1);
    }
    .mym-panel-body {
        flex: 1;
        overflow-y: auto;
        padding: 24px;
    }
    .mym-panel-body .page-breadcrumb,
    .mym-panel-body .navbar-items {
        display: none;
    }
    .mym-panel-body.loading {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body.dark-mode .mym-panel {
        background: #1e1e2a;
    }
    body.dark-mode .mym-panel-header {
        border-color: #2d2d3d;
    }
    body.dark-mode .mym-panel-close {
        background: #3d1f1f;
        color: #f87171;
    }
    body.dark-mode .mym-panel-close:hover {
        background: #4d2525;
    }
    .mym-panel-footer {
        flex-shrink: 0;
        padding: 8px 24px;
        border-top: 1px solid #e2e8f0;
        background: #fff;
        overflow: visible;
        position: relative;
        z-index: 1;
    }
    .mym-panel-footer:empty {
        display: none;
    }
    .mym-panel-footer .prolet-body-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        border: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        min-height: 0;
    }
    .mym-panel-footer .list-inline {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }
    .mym-panel-footer .list-inline > li {
        overflow: visible;
    }
    .mym-panel-footer .list-inline .btn {
        white-space: nowrap;
        border-radius: 8px;
        font-size: 13px;
        padding: 7px 14px;
        font-weight: 500;
    }
    /* dropdowns in footer open side into panel */
    html[dir='ltr'] .mym-panel-footer .dropdown-menu {
        top: 0;
        bottom: auto;
        left: auto;
        right: 100%;
        margin-right: 4px;
        margin-top: 0;
    }
    html[dir='rtl'] .mym-panel-footer .dropdown-menu {
        top: 0;
        bottom: auto;
        right: auto;
        left: 100%;
        margin-left: 4px;
        margin-top: 0;
    }
    body.dark-mode .mym-panel-footer {
        background: #1e1e2a;
        border-color: #2d2d3d;
    }
    body.dark-mode .mym-panel-footer .prolet-body-actions,
    body.dark-mode .mym-panel-footer .portlet-body-actions {
        background: transparent;
    }
}

/* RTL overrides */
html[dir='rtl'] .page-sidebar {
    border-right: none !important;
    border-left: 1px solid #f0f0f0;
    box-shadow: -2px 0 12px rgba(0,0,0,0.03);
}
html[dir='rtl'] .page-sidebar-toggle {
    left: auto !important;
    right: 228px;
    border-radius: 6px 0 0 6px !important;
    border: 1px solid #e5e7eb;
    border-right: none;
    box-shadow: -2px 0 6px rgba(0,0,0,0.05);
}
html[dir='rtl'] body.page-sidebar-closed .page-sidebar-toggle {
    right: 33px;
    left: auto !important;
}
html[dir='rtl'] .mym-nav-bar {
    left: 0 !important;
    right: 228px;
}
html[dir='rtl'] body.page-sidebar-closed .mym-nav-bar {
    right: 33px;
}
html[dir='rtl'] .mym-counter-ticker {
    left: 0 !important;
    right: 228px;
}
html[dir='rtl'] body.page-sidebar-closed .mym-counter-ticker {
    right: 33px;
}
html[dir='rtl'] .page-content-wrapper {
    margin-left: 0 !important;
    margin-right: 228px;
}
html[dir='rtl'] body.page-sidebar-closed .page-content-wrapper {
    margin-right: 33px;
}

/* Dark mode toggle visibility fix for navbar-inverse */
.mym-dark-toggle a {
    color: #9ca3af !important;
}
.mym-dark-toggle a:hover {
    color: #f97316 !important;
}
