/* ============================================
   Theme Dark - Variables & Dark-specific styles
   ============================================ */

:root {
    --blue: #151f24;
    --indigo: #140330;
    --purple: #25222b;
    --pink: #e83e8c;
    --red: #ED5564;
    --orange: #fd7e14;
    --yellow: #FCCE54;
    --green: #7dc855;
    --teal: #20c997;
    --cyan: #78BCEE;
    --white: #fff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --primary: #03a9f4;
    --secondary: #6c757d;
    --success: #7dc855;
    --info: #78BCEE;
    --warning: #FCCE54;
    --danger: #ED5564;
    --light: #f8f9fa;
    --dark: #272C33;
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --stat-card-bg: rgba(16, 19, 26, 0.4);


    /* Role Colors */
    --role-admin: #2979ff;
    --role-shipper: #4d438b;
    --role-customer: #4ca21f;
    --role-partner: #129b9b;

    /* Role Backgrounds (Lighter shades for Dark Mode) */
    --role-admin-bg: rgba(41, 121, 255, 0.18);
    --role-shipper-bg: rgba(77, 67, 139, 0.18);
    --role-customer-bg: rgba(76, 162, 31, 0.18);
    --role-partner-bg: rgba(18, 155, 155, 0.18);

    /* Role Text colors for Dark Mode */
    --role-admin-text: #74a6ff;
    --role-shipper-text: #8c81c7;
    --role-customer-text: #7ed452;
    --role-partner-text: #2abfbf;

    /* Subtask Card Theme - Dark */
    --subtask-card-bg: rgba(30, 36, 48, 0.4);
    --subtask-card-border: rgba(255, 255, 255, 0.08);
    --subtask-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --subtask-id-color: rgba(255, 255, 255, 0.25);
    --subtask-title-color: #ffffff;
    --subtask-desc-color: rgba(255, 255, 255, 0.5);
    --subtask-meta-color: rgba(255, 255, 255, 0.25);
    --subtask-enter-bg: rgba(66, 76, 112, 0.35);
    --subtask-enter-text: #8c9eff;
    --subtask-action-opacity: 0.4;

    /* Status Pills - Dark */
    --status-active-bg: rgba(41, 121, 255, 0.15);
    --status-active-text: #74a6ff;
    --status-active-border: rgba(41, 121, 255, 0.25);

    --status-complete-bg: rgba(76, 162, 31, 0.15);
    --status-complete-text: #7ed452;
    --status-complete-border: rgba(76, 162, 31, 0.25);

    --status-pending-bg: rgba(237, 85, 100, 0.15);
    --status-pending-text: #ff7684;
    --status-pending-border: rgba(237, 85, 100, 0.25);

    --status-paid-bg: rgba(18, 155, 155, 0.15);
    --status-paid-text: #2abfbf;
    --status-paid-text: #2abfbf;
    --status-paid-border: rgba(18, 155, 155, 0.25);

    /* Partner Query Specifics - Dark */
    --query-section-bg: rgba(41, 121, 255, 0.1);
    --query-section-border: rgba(255, 255, 255, 0.1);
    --query-note-bg: rgba(255, 255, 255, 0.03);
    --query-label-color: rgba(255, 255, 255, 0.5);
    --query-icon-bg: rgba(41, 121, 255, 0.1);
    --query-summary-dash: rgba(41, 121, 255, 0.5);

    /* Extra UI Elements - Dark */
    --counter-box-border: rgba(255, 255, 255, 0.1);
    --counter-box-shadow: rgba(0, 0, 0, 0.5);

    /* Chat Compose - Dark */
    --chat-compose-bg: rgba(0, 0, 0, 0.2);
    --chat-compose-border: rgba(255, 255, 255, 0.1);
    --chat-compose-text: #fff;

    /* Shipper Specific - Dark */
    --shipper-tab-bg: #4d438b;
    --shipper-tab-text: #fff;
    --shipper-tab-active-bg: rgba(255, 255, 255, 0.1);
    --shipper-chat-me-bg: #4d438b;
    --shipper-chat-them-bg: #2d2f2c;

    /* Task Focus (General) - Dark */
    --task-focus-title-color: #ffffff;
    --task-focus-para-color: rgba(255, 255, 255, 0.7);
    --task-focus-card-bg: rgba(30, 36, 48, 0.4);
    --task-focus-card-border: rgba(255, 255, 255, 0.08);
    --task-focus-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

    /* Price & Approval Card - Dark */
    --task-focus-price-bg: linear-gradient(145deg, rgba(58, 50, 115, 0.96) 0%, rgba(40, 35, 90, 0.96) 100%);
    --task-focus-price-text: #f3f5fb;
    --task-focus-price-border: rgba(255, 255, 255, 0.15);
    --task-focus-note-color: rgba(255, 255, 255, 0.9);

    --task-focus-validity-text: rgba(214, 221, 235, 0.76);
    --task-focus-validity-date: #e8edf9;

    /* Buttons - Dark */
    --task-focus-approve-bg: linear-gradient(90deg, #3b349b 0%, #6727a8 100%);
    --task-focus-approve-text: #d3d8ea;
    --task-focus-accept-bg: linear-gradient(90deg, #2f7b55 0%, #24945f 100%);
    --task-focus-accept-text: #ecfff2;

    /* Terms Check - Dark */
    --task-focus-terms-bg: rgba(15, 23, 36, 0.58);
    --task-focus-terms-border: rgba(255, 255, 255, 0.1);
    --task-focus-terms-text: rgba(255, 255, 255, 0.7);
    --task-focus-terms-link: #8c9eff;
    --task-focus-terms-check-border: rgba(255, 255, 255, 0.2);

    /* Shipment Tracking - Dark */
    --tracking-rail-color: rgba(255, 255, 255, 0.08);
    --tracking-rail-done: rgba(99, 102, 241, 0.4);
    --tracking-dot-bg: rgba(30, 36, 48, 0.9);
    --tracking-dot-border: rgba(255, 255, 255, 0.15);
    --tracking-dot-done-bg: #6366f1;
    --tracking-dot-done-border: rgba(99, 102, 241, 0.5);
    --tracking-dot-done-glow: rgba(99, 102, 241, 0.25);
    --tracking-dot-current-bg: #818cf8;
    --tracking-dot-current-border: rgba(129, 140, 248, 0.6);
    --tracking-dot-current-glow: rgba(129, 140, 248, 0.35);
    --tracking-dot-icon: rgba(255, 255, 255, 0.3);
    --tracking-dot-icon-done: rgba(255, 255, 255, 0.95);
    --tracking-title-color: rgba(255, 255, 255, 0.45);
    --tracking-title-done: rgba(255, 255, 255, 0.85);
    --tracking-title-current: #ffffff;
    --tracking-date-color: rgba(255, 255, 255, 0.35);
    --tracking-date-done: rgba(167, 139, 250, 0.8);
    --tracking-step-bg-hover: rgba(255, 255, 255, 0.03);

    /* Sidebar Icon Colors - Theme Dark */
    --icon-dashboard: #4dadff;
    --icon-contacts: #69c440;
    --icon-users: #a885f7;
    --icon-tasks: #ffa742;
    --icon-queries: #20c9c9;
    --icon-quotes: #7e74c0;
    --icon-archive: #94a3b8;
    --icon-stats: #17d1bf;
    --icon-emails: #f16868;
    --icon-settings: #abb5bf;
    --icon-megaphone: #e0ab3b;
    --icon-feedback: #60a5fa;
}

hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .2)
}

.img-thumbnail {
    padding: .25rem;
    background-color: #ecf0f5;
    border: 1px solid #bfc3c6da;
    border-radius: .25rem;
    max-width: 100%;
    height: auto
}

.table td,
.table th {
    padding: .75rem;
    vertical-align: top;
    border-top: 0.5px solid #adbcc8b5;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #e1e8eebe
}

.table tbody+tbody {
    border-top: 2px solid #e1e8eea6
}

.table-bordered {
    border: 1px solid #e1e8eeb1
}

.table-bordered td,
.table-bordered th {
    border: 1px solid #e1e8eead
}

.table-hover tbody tr:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.table-secondary tbody+tbody,
.table-secondary td,
.table-secondary th,
.table-secondary thead th {
    border-color: #b3b7bb9d
}

.table-light tbody+tbody,
.table-light td,
.table-light th,
.table-light thead th {
    border-color: #fbfcfc85
}

.table-dark tbody+tbody,
.table-dark td,
.table-dark th,
.table-dark thead th {
    border-color: #8f9195a0
}

.table .thead-dark th {
    color: #fff;
    background-color: #343a40;
    border-color: #454d559a
}

.table .thead-light th {
    color: #495057;
    background-color: #e9ecef;
    border-color: #e1e8ee9b
}

.table-dark td,
.table-dark th,
.table-dark thead th {
    border-color: #454d5596
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da8e;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out
}

.border-top {
    border-top: 0.5px solid #dee2e663 !important
}

.border-bottom {
    border-bottom: 0.4px solid #dee2e69c !important
}

/* Better DateRangePicker Styles for Dark Theme */

.theme-dark .daterangepicker {
    font-family: inherit !important;
    border: 1px solid #30384b !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    border-radius: 12px !important;
    padding: 10px !important;
    margin-top: 5px !important;
    background-color: #1a2233 !important;
    color: #e1e8ee !important;
}

.theme-dark .daterangepicker .calendar-table {
    border: none !important;
    background: transparent !important;
}

.theme-dark .daterangepicker td,
.theme-dark .daterangepicker th {
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 13px !important;
    color: #e1e8ee !important;
    transition: all 0.2s ease;
}

.theme-dark .daterangepicker td.available:hover,
.theme-dark .daterangepicker th.available:hover {
    background-color: #2a344d !important;
    color: #fff !important;
}

.theme-dark .daterangepicker td.off,
.theme-dark .daterangepicker td.off.in-range,
.theme-dark .daterangepicker td.off.start-date,
.theme-dark .daterangepicker td.off.end-date {
    color: #4a5568 !important;
    background: transparent !important;
}

.theme-dark .daterangepicker td.in-range {
    background-color: rgba(3, 169, 244, 0.15) !important;
    border-radius: 0 !important;
    color: #fff !important;
}

.theme-dark .daterangepicker td.active,
.theme-dark .daterangepicker td.active:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(3, 169, 244, 0.4) !important;
}

.theme-dark .daterangepicker .ranges li {
    background-color: #131c2e !important;
    border: 1px solid #30384b !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    color: #e1e8ee !important;
    margin-bottom: 5px !important;
}

.theme-dark .daterangepicker .ranges li:hover {
    background-color: #2a344d !important;
    color: #fff !important;
}

.theme-dark .daterangepicker .ranges li.active {
    background-color: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.theme-dark .daterangepicker select.monthselect,
.theme-dark .daterangepicker select.yearselect {
    padding: 2px 8px !important;
    border: 1px solid #30384b !important;
    border-radius: 6px !important;
    background-color: #131c2e !important;
    color: #fff !important;
}

.select2-close-mask {
    border: 0;
    margin: 0;
    padding: 0;
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    min-height: 100%;
    min-width: 100%;
    height: auto;
    width: auto;
    opacity: 0;
    z-index: 99;
    background-color: transparent !important
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background-color: var(--bg-card) !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
}

.select2-container--default .select2-search--dropdown {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    background-color: var(--bg-card) !important;
    border-radius: 2px 2px 0 0 !important;
    margin-bottom: 10px;
    margin-top: -10px;
    position: relative;
    padding: 8px 10px;
}

.chat-widget .by-me .chat-content:after,
.chat-widget .by-me .chat-content:before {
    right: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none
}

.edited_chat_content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.5rem;
    width: 100%;
}

.edited_chat_content textarea#edited_text {
    width: 100%;
    min-height: 50px;
    border: none;
    background: transparent;
    resize: vertical;
    font-size: 0.8125rem;
    padding: 5px;
    margin-bottom: 0.5rem;
    color: #e2e8f0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.edited_chat_content .btn {
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.edited_chat_content .btn i {
    font-size: 12px;
    margin: 0;
}

.theme-dark .list-group-item,
.theme-dark .main-sidebar,
.theme-dark .navbar,
.theme-dark.body,
.theme-dark.main-sidebar,
.theme-dark.navbar {
    background: var(--surface-bg-elevated) !important
}

.theme-dark .b-b,
.theme-dark .b-l,
.theme-dark .b-r,
.theme-dark .b-t,
.theme-dark .form-material .form-group .form-line,
.theme-dark .list-group-item,
.theme-dark.b-b,
.theme-dark.b-l,
.theme-dark.b-r,
.theme-dark.b-t {
    border-color: var(--surface-border-strong) !important
}

.theme-dark .card-header .white,
.theme-dark .light,
.theme-dark .sidebar-menu li a:hover {
    background: rgba(0, 0, 0, .1)
}

.theme-dark .offcanvas .sidebar-menu>li,
.theme-dark .sidebar-tabs,
.theme-dark .tab-content,
.theme-dark.offcanvas .sidebar-menu>li {
    border-color: var(--surface-border-strong) !important
}

.theme-dark .tab-content a.nav-link.active {
    background: var(--sidebar-tab-active-bg);
}

:root {
    /* 
       Color Palette 
       Backgrounds: Deep Navy / Slate
    */
    --bg-body: #0b1220;
    --bg-card: #152238;
    --bg-card-hover: #1f2f4b;
    --bg-input: #101b2f;
    --bg-dropdown: #142238;

    /* Text Colors */
    --text-main: #f5f8ff;
    --text-secondary: #d5dfeb;
    --text-muted: #98a9c0;
    --text-inverse: #0f172a;

    /* Primary Accents - Indigo/Violet */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.16);

    --accent: #14b8a6;
    --accent-hover: #0d9488;

    /* Functional Colors */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #38bdf8;
    --info-bg: rgba(56, 189, 248, 0.12);

    /* Role Identity Colors - locked business mapping */
    --role-admin: #2979ff;
    --role-shipper: #4d438b;
    --role-customer: #4ca21f;
    --role-partner: #129b9b;
    --role-shipper-soft: rgba(77, 67, 139, 0.67);

    /* Borders & Dividers */
    --border-color: rgba(148, 163, 184, 0.22);
    --border-hover: rgba(148, 163, 184, 0.38);
    --divider: rgba(148, 163, 184, 0.14);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.28);

    /* Spacing & Layout */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 16px;

    --control-height: 38px;
    --select2-control-height: 34px;

    /* Typography */
    --app-font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-body: 0.9rem;
    --font-size-table: 0.85rem;
    --font-size-table-head: 0.75rem;
    --font-size-caption: 0.79rem;
    --header-height: 60px;
    --sidebar-width: 250px; /* Default */
}

body.opt-sidebar-small {
    --sidebar-width: 150px;
}

body.opt-sidebar-large {
    --sidebar-width: 250px;
}

:root {
    --sidebar-collapsed: 60px;
    --transition: all 0.2s ease-in-out;

    /* Shared component theme tokens */
    --surface-bg-elevated: #131C2E;
    --navbar-bg: var(--surface-bg-elevated);
    --surface-border-strong: #30384b;
    --sidebar-tab-active-bg: #343a40;

    --card-bg: var(--surface-bg-elevated);
    --card-border-color: var(--border-color);
    --card-shadow: var(--shadow-md);
    --card-hover-border-color: var(--border-hover);
    --card-hover-shadow: var(--shadow-lg), var(--shadow-glow);
    --card-header-bg: transparent;
    --card-header-color: var(--text-main);
    --card-body-color: var(--text-secondary);
    --card-footer-bg: transparent;
    --card-footer-color: var(--text-secondary);

    --btn-primary-bg: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --btn-primary-text: #ffffff;
    --btn-primary-border: transparent;
    --btn-primary-hover-filter: brightness(110%);
    --btn-primary-hover-shadow: var(--shadow-glow);
    --btn-outline-primary-bg: transparent;
    --btn-outline-primary-text: var(--primary);
    --btn-outline-primary-border: var(--primary);
    --btn-outline-primary-hover-bg: var(--primary-light);
    --btn-outline-primary-hover-text: var(--primary);
    --btn-secondary-bg: var(--bg-card-hover);
    --btn-secondary-text: var(--text-secondary);
    --btn-secondary-border: var(--border-color);
    --btn-secondary-hover-bg: #475569;
    --btn-secondary-hover-text: #ffffff;

    --form-control-bg: #0c162b;
    --form-control-border: #31384c;
    --form-control-color: #ffffff;
    --form-control-focus-border: var(--primary);
    --form-control-focus-ring: rgba(59, 130, 246, 0.2);

    --table-bg: var(--bg-card);
    --table-text: var(--text-secondary);
    --table-border-color: var(--border-color);
    --table-header-bg: rgba(255, 255, 255, 0.02);
    --table-header-text: var(--text-muted);
    --table-row-hover-bg: rgba(0, 0, 0, 0.1);
    --table-row-hover-text: var(--text-secondary);
    --table-striped-bg: rgba(255, 255, 255, 0.02);

    --badge-primary-bg: var(--primary-light);
    --badge-primary-text: #818cf8;
    --badge-primary-border: rgba(99, 102, 241, 0.2);
    --badge-success-bg: var(--success-bg);
    --badge-success-text: #34d399;
    --badge-success-border: rgba(16, 185, 129, 0.2);
    --badge-warning-bg: var(--warning-bg);
    --badge-warning-text: #fbbf24;
    --badge-warning-border: rgba(245, 158, 11, 0.2);
    --badge-danger-bg: var(--danger-bg);
    --badge-danger-text: #f87171;
    --badge-danger-border: rgba(239, 68, 68, 0.2);
    --badge-info-dark-bg: #0f172a;
    --badge-info-dark-text: #ffffff;
    --badge-info-dark-border: transparent;

    --alert-shadow: 0 10px 22px rgba(2, 6, 23, 0.28);
    --alert-primary-text: #d8e9ff;
    --alert-primary-bg: rgba(37, 99, 235, 0.2);
    --alert-primary-border: rgba(96, 165, 250, 0.48);
    --alert-secondary-text: #d5deeb;
    --alert-secondary-bg: rgba(100, 116, 139, 0.2);
    --alert-secondary-border: rgba(148, 163, 184, 0.44);
    --alert-success-text: #bbf7d0;
    --alert-success-bg: rgba(16, 185, 129, 0.18);
    --alert-success-border: rgba(16, 185, 129, 0.42);
    --alert-info-text: #bae6fd;
    --alert-info-bg: rgba(14, 165, 233, 0.18);
    --alert-info-border: rgba(56, 189, 248, 0.42);
    --alert-warning-text: #fde68a;
    --alert-warning-bg: rgba(245, 158, 11, 0.2);
    --alert-warning-border: rgba(245, 158, 11, 0.46);
    --alert-danger-text: #fecaca;
    --alert-danger-bg: rgba(239, 68, 68, 0.18);
    --alert-danger-border: rgba(248, 113, 113, 0.46);
    --alert-light-text: #e2e8f0;
    --alert-light-bg: rgba(148, 163, 184, 0.16);
    --alert-light-border: rgba(148, 163, 184, 0.36);
    --alert-dark-text: #f8fafc;
    --alert-dark-bg: rgba(15, 23, 42, 0.5);
    --alert-dark-border: rgba(51, 65, 85, 0.52);

    --toast-border: rgba(15, 33, 56, 0.2);
    --toast-shadow: 0 20px 42px rgba(2, 6, 23, 0.32);
}

@media (min-width: 768px) {

    /* BASE SIDEBAR: Collapsed by Default */
    .main-sidebar {
        width: 60px !important;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
        z-index: 1050;
        white-space: nowrap;
    }

    /* When a modal is open, push the sidebar behind the backdrop */
    body.modal-open .main-sidebar {
        z-index: 39 !important;
    }

    /* FULL WIDTH: When Locked or Hovered */
    body.sidebar-locked .main-sidebar,
    body.sidebar-expanded-on-hover .main-sidebar {
        width: var(--sidebar-width) !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
    }

    /* TEXT VISIBILITY: Hide when collapsed */
    .main-sidebar .menu-text,
    .main-sidebar .brand-text,
    .main-sidebar .submenu-arrow {
        opacity: 0;
        visibility: hidden;
        width: 0;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        transition: opacity 0.2s ease, width 0.2s ease, margin 0.2s ease;
        vertical-align: middle;
    }

    /* Section headers hidden when collapsed */
    .sidebar-section-header {
        opacity: 0;
        height: 0;
        padding: 0 !important;
        margin: 0;
        overflow: hidden;
        transition: opacity 0.2s ease, height 0.2s ease, padding 0.2s ease;
    }

    /* TOGGLE BUTTON: Hidden while fully collapsed */
    .main-sidebar #sidebarLockToggle {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    body.sidebar-locked .main-sidebar #sidebarLockToggle,
    body.sidebar-expanded-on-hover .main-sidebar #sidebarLockToggle {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto;
    }

    /* TEXT VISIBILITY: Show when expanded */
    body.sidebar-locked .main-sidebar .menu-text,
    body.sidebar-expanded-on-hover .main-sidebar .menu-text {
        opacity: 1;
        visibility: visible;
        width: auto;
        margin-left: 0;
        transition-delay: 0.08s;
    }

    body.sidebar-locked .main-sidebar .submenu-arrow,
    body.sidebar-expanded-on-hover .main-sidebar .submenu-arrow {
        opacity: 0.5;
        visibility: visible;
        width: auto;
        transition-delay: 0.08s;
    }

    body.sidebar-locked .main-sidebar .brand-text,
    body.sidebar-expanded-on-hover .main-sidebar .brand-text {
        opacity: 1;
        visibility: visible;
        width: auto;
        margin-right: auto;
        transition-delay: 0.08s;
    }

    /* Section headers visible when expanded */
    body.sidebar-locked .sidebar-section-header,
    body.sidebar-expanded-on-hover .sidebar-section-header {
        opacity: 1;
        height: auto;
        padding: 16px 14px 6px 14px !important;
        transition-delay: 0.05s;
    }

    /* SUBMENU VISIBILITY: Hide in collapsed state */
    .treeview-menu {
        display: none !important;
        max-height: 0;
        opacity: 0;
    }

    body.sidebar-locked .treeview-menu,
    body.sidebar-expanded-on-hover .treeview-menu {
        display: block !important;
    }

    body.sidebar-locked .treeview.menu-open>.treeview-menu,
    body.sidebar-expanded-on-hover .treeview.menu-open>.treeview-menu {
        max-height: 500px;
        opacity: 1;
        padding: 4px 0 4px 0px !important;
        margin-left: -5px !important;
    }

    /* PAGE CONTENT ADJUSTMENT */
    .page,
    .has-sidebar-left {
        margin-left: 60px !important;
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: auto !important;
    }

    body.sidebar-locked .page,
    body.sidebar-locked .has-sidebar-left {
        margin-left: var(--sidebar-width) !important;
    }

    /* Hover: Don't shift content, overlay sidebar */
    body.sidebar-expanded-on-hover .page,
    body.sidebar-expanded-on-hover .has-sidebar-left {
        margin-left: 60px !important;
    }

    /* --- Tooltip for Collapsed Sidebar --- */
    .main-sidebar li.treeview[data-tooltip] {
        position: relative;
    }

    .main-sidebar li.treeview[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 62px;
        top: 50%;
        transform: translateY(-50%) scale(0.9);
        background: #1e293b;
        color: #e2e8f0;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.75rem;
        font-weight: 500;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        z-index: 9999;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: opacity 0.15s ease, transform 0.15s ease;
    }

    .main-sidebar li.treeview[data-tooltip]:hover::after {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    /* Hide tooltip when sidebar is expanded */
    body.sidebar-locked .main-sidebar li.treeview[data-tooltip]::after,
    body.sidebar-expanded-on-hover .main-sidebar li.treeview[data-tooltip]::after {
        display: none;
    }
}

.accordion>.card .card-header button.btn.btn-link {
    color: #fff !important;
    width: 100% !important;
    text-align: left !important;
    border-radius: 0px;
    display: block !important;
    text-decoration: none !important;
    outline: none;
    box-shadow: none;
}

.m_emoji-container-wrapper {
    position: absolute;
    z-index: 9999;
}

.m_emoji-container {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: #6f6f6f;
    border-radius: 6px;
}

.m_emoji-picker {
    width: 26px;
    cursor: pointer;
}

.m_emoji-fab {
    /* position: absolute;
    cursor: pointer;
    z-index: 9999; */

    width: 30px;
    height: 30px;
    background-color: #444;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
}

.m_emoji-close {
    background: none;
    border: none;
    cursor: pointer;
}

.file-preview-modal .modal-dialog {
    max-width: min(1180px, 92vw);
}

.file-preview-modal .modal-content.file-preview-shell {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.file-preview-shell-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
    padding: 1rem 1.25rem;
    align-items: center;
}

.file-preview-kicker {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.1rem;
}

.file-preview-title {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    max-width: 70vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-close {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    opacity: 1;
    text-shadow: none;
    box-shadow: none;
    line-height: 1;
}

.file-preview-close:hover,
.file-preview-close:focus {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.file-preview-shell-body {
    padding: 0;
    background: #0f1724;
}

.file-preview-stage {
    min-height: 80vh;
}

.preview-container {
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 36, 0.88);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 5;
}

.zoom-controls {
    display: flex;
    gap: 0.5rem;
}

.file-preview-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border-radius: 8px;
    font-weight: 600;
    min-width: 2.35rem;
}

.file-preview-btn:hover,
.file-preview-btn:focus {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    box-shadow: none;
}

.preview-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.file-preview-scroll {
    width: 100%;
    max-height: calc(85vh - 4rem);
    overflow: auto;
    border-radius: 14px;
    background: var(--bg-card-hover);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem;
}

.preview-image,
.preview-video,
.preview-frame,
.preview-embed {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 75vh;
    max-height: 85vh;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
}

.preview-image {
    width: auto;
    margin: 0 auto;
    min-height: auto;
    cursor: move;
    transition: transform 0.2s ease;
}

.preview-video {
    background: #000;
}

.file-preview-text-wrap {
    padding: 1.1rem 1.2rem;
}

.preview-text-block {
    margin: 0;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--text-main);
    font-size: 0.875rem;
    line-height: 1.65;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.preview-empty-state {
    width: 100%;
    max-width: 520px;
    margin: 2rem auto;
    padding: 1.25rem 1.4rem;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
}

.preview-empty-state a {
    color: var(--role-admin);
    text-decoration: none;
}

.chat-dropdown {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 0.35rem;
    min-width: 170px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.chat-dropdown .chat-dropdown-item>a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem !important;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.chat-dropdown .chat-dropdown-item>a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.chat-dropdown .chat-dropdown-item>a[class*="delete_"] {
    color: #ff8b8b;
}

.chat-dropdown .chat-dropdown-item>a[class*="set_reminder"],
.chat-dropdown .chat-dropdown-item>a[class*="remove_reminder"] {
    color: #c8d0db;
}

.task-detail-view .chat-content.float-right .chat-action-trigger {
    color: rgba(255, 255, 255, 0.82) !important;
}

.task-detail-view .chat-content.float-left .chat-action-trigger {
    color: rgba(226, 232, 240, 0.72) !important;
}

/* =========================================
   Theme Dark: Shared Compact Layout
   ========================================= */

body.theme-dark,
.theme-dark body {
    background-color: var(--bg-body) !important;
    color: var(--text-main) !important;
}

/* Table theme overrides for dark mode */
.table {
    color: var(--text-main);
}

.table td,
.table th {
    border-top-color: var(--border-color);
    vertical-align: middle;
}

.table thead th {
    border-bottom-color: var(--border-color);
    color: var(--text-muted);
}

.table tbody+tbody {
    border-top-color: var(--border-color);
}

.table-bordered {
    border-color: var(--border-color);
}

.table-bordered td,
.table-bordered th {
    border-color: var(--border-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--table-striped-bg, rgba(255, 255, 255, 0.02));
}

.table-hover tbody tr:hover {
    color: var(--text-main) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
}

.table .thead-dark th {
    border-color: var(--border-color);
}

.table .thead-light th {
    background-color: var(--bg-card-hover);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.card {
    background-color: var(--card-bg, var(--bg-card));
    border-color: var(--card-border-color, var(--border-color));
}

.card-header,
.card-body,
.card-footer {
    padding: var(--space-3) var(--space-4);
}

.form-group {
    margin-bottom: var(--space-3);
}

.form-control,
select.form-control {
    min-height: var(--control-height);
    height: var(--control-height);
    padding: 6px 10px;
}

textarea.form-control,
.chat-textarea,
.text-area,
.m_chat-editor {
    min-height: 84px;
    height: auto;
}

.btn,
.btn-sm {
    border-radius: var(--radius-sm);
}

.table th,
.table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.theme-toggle-btn {
    min-height: 34px;
    border-radius: 999px;
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #e5e7eb;
}

.theme-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.28);
    color: #ffffff;
}

.auth-language-switch .theme-toggle-btn.active {
    background: rgba(99, 102, 241, 0.35);
    border-color: rgba(129, 140, 248, 0.65);
    color: #ffffff;
}

/* Sidebar user panel polish (dark theme) */

.sidebar-user-panel {
    margin: 8px !important;
    padding: 10px 12px !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    position: relative;
    overflow: visible;
}

.sidebar-user-avatar {
    min-width: 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--sidebar-avatar-bg, #4f46e5) !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar .notification_image {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.sidebar-user-avatar .avatar-status-dot {
    border-color: #0f1729;
}

.sidebar-lock-toggle-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 999px !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #0b1220 !important;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.4);
}

.sidebar-lock-toggle-btn:hover {
    color: #ffffff !important;
    border-color: rgba(99, 102, 241, 0.55);
    background: #141e36 !important;
}

body.sidebar-locked .sidebar-lock-toggle-btn {
    color: #93c5fd !important;
    border-color: rgba(99, 102, 241, 0.65);
    background: #1a2540 !important;
}

.page-index-header {
    background: linear-gradient(135deg, #21334d 0%, #1a2a40 100%) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.page-index-subtitle {
    font-size: var(--font-size-caption);
    color: var(--text-muted) !important;
}

.table th,
table.dataTable thead th {
    font-size: var(--font-size-table-head);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.35;
    background: rgba(148, 163, 184, 0.08);
}

.dashboard-topbar .header-lang-label {
    color: #ffffff;
}

.dashboard-topbar #notification_details_block::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.dashboard-topbar .notification-footer {
    border-top: 1px solid #202020;
}

.dashboard-topbar .notification-footer-link {
    font-size: 15px;
    text-align: center;
    color: #ffffff !important;
}

.table td.user_operator_details .user_operators_list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 4px;
    background: rgba(71, 85, 105, 0.45);
    border-radius: 999px;
    width: max-content;
    max-width: 100%;
    flex-wrap: wrap;
}

.table td.user_operator_details .user_operator_content {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #0f172a;
    color: #e2e8f0;
    text-align: left;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    z-index: 999;
    max-width: 240px;
    min-width: 80px;
    white-space: normal;
    box-shadow: var(--shadow-md);
}

.dashboard-topbar {
    min-height: 56px;
    padding: 6px 14px !important;
    border-bottom: 1px solid rgba(110, 231, 183, 0.22);
    background: linear-gradient(118deg, rgba(12, 24, 40, 0.97) 0%, rgba(14, 52, 45, 0.95) 52%, rgba(12, 29, 45, 0.97) 100%) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dashboard-topbar .header-pill {
    padding: 0 10px !important;
    color: #e5f3ff;
    border-width: 1px;
}

.dashboard-topbar #theme-toggle,
.dashboard-topbar .header-lang-trigger,
.dashboard-topbar .header-bell-trigger,
.dashboard-topbar .user-menu-trigger,
.dashboard-topbar .header-action-create,
.dashboard-topbar .header-pill-todo {
    border: 1px solid rgba(110, 231, 183, 0.26);
    background: rgba(20, 46, 44, 0.72) !important;
    color: #dbe7f5 !important;
    padding: 0 10px;
    text-decoration: none !important;
}

.dashboard-topbar .header-lang-label {
    color: #dbe7f5;
    font-weight: 600;
}

.dashboard-topbar .notification-count-badge {
    position: absolute !important;
    top: -6px;
    right: -6px;
    bottom: auto !important;
    min-width: 18px;
    height: 18px;
    background: #ed143dc9;
    padding: 0 5px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 12px;
    font-weight: 700 !important;
    border: 0.5px solid #0f172a;
    color: #fff;
}

.dashboard-topbar .dropdown-menu,
.dashboard-topbar .navbar-custom-menu .navbar-nav>li>.dropdown-menu {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #0f172a;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.45);
    margin-top: 10px;
}

.dashboard-topbar .dropdown-menu .dropdown-item,
.dashboard-topbar .navbar-custom-menu .navbar-nav>li>.dropdown-menu .dropdown-item {
    color: #cbd5e1;
}

.dashboard-topbar .dropdown-menu .dropdown-item:hover,
.dashboard-topbar .navbar-custom-menu .navbar-nav>li>.dropdown-menu .dropdown-item:hover {
    background: rgba(51, 65, 85, 0.75);
    color: #ffffff;
}

.dashboard-topbar #notification_details_block::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.dashboard-topbar .notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dashboard-topbar .notification-dropdown-title {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.01em;
}

.dashboard-topbar .notification-mark-all {
    color: #7dd3fc;
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-topbar .notification-mark-all:hover {
    color: #bae6fd;
}

.dashboard-topbar .notification-item-title {
    margin: 0 0 4px;
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 700;
    color: #93c5fd;
}

.dashboard-topbar .notification-item-text {
    margin: 0 0 3px;
    color: #f8fbff;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
}

.dashboard-topbar .notification-item-time {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8 !important;
}

.dashboard-topbar .notification-mark-single {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    border: 1px solid transparent;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.dashboard-topbar .notification-mark-single:hover {
    background: rgba(148, 163, 184, 0.16);
    border-color: rgba(148, 163, 184, 0.28);
    color: #ffffff;
}

.dashboard-topbar .notification-divider {
    margin: 0;
    border-top-color: rgba(148, 163, 184, 0.2);
}

.dashboard-topbar .notification-empty-state {
    padding: 14px 14px 16px;
    color: #94a3b8;
    font-size: 0.8rem;
}

.dashboard-topbar .notification-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.dashboard-topbar .notification-footer-link {
    color: #e2e8f0 !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-topbar .header-user-menu-link {
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    text-align: center;
}

.dashboard-topbar .header-user-menu-link:hover {
    color: #ffffff;
}

.dashboard-topbar .header-menu-icon.profile-icon {
    color: #38bdf8;
}

.dashboard-topbar .header-menu-icon.logout-icon {
    color: #f87171;
}

.notifications-page-header {
    margin: 12px 15px 0;
    padding: 14px 6px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.35);
}

.notifications-page-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.notifications-page-subtitle {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 0.8rem;
}

.notifications-page .notification_custom_switch {
    padding: 8px 16px 8px 44px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(30, 41, 59, 0.55);
}

.notifications-page .notification_custom_switch .custom-control-label {
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
}

.notifications-page .notification_custom_switch .custom-control-label::before {
    top: 1px !important;
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.42);
}

.notifications-page-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
}

.notifications-list-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.notifications-page .notification_list_item {
    margin: 10px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.82);
}

.notifications-page .notification_list_item.read {
    opacity: 0.9;
}

.notifications-page .notification_list_item.unread {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.14);
}

.notifications-unread-dot {
    width: 8px !important;
    height: 8px !important;
    left: auto !important;
    right: -2px;
    top: -1px;
    background: #38bdf8 !important;
    box-shadow: 0 0 0 2px #0f172a;
}

.notifications-item-title {
    margin: 0 0 5px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #bfdbfe;
}

.notifications-relative-time {
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 0.71rem;
    font-weight: 600;
}

.notifications-item-message {
    margin: 0 0 8px;
    color: #f1f5f9;
    font-size: 0.84rem;
    line-height: 1.45;
    font-weight: 500;
}

.notifications-meta-time {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8 !important;
}

.notifications-mark-read-link {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none !important;
}

.notifications-mark-read-link:hover {
    border-color: rgba(56, 189, 248, 0.55);
    color: #f8fafc;
}

.notifications-list-endnote-text {
    width: min(360px, 100%);
    margin: 0 auto;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.45;
}

.notifications-list-endnote-text i {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
    color: #60a5fa;
}

.page-shell-header {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.42);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -70px;
    top: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.32) 0%, rgba(56, 189, 248, 0) 70%);
    pointer-events: none;
}

.page-shell-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(118deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 45%, rgba(15, 23, 42, 0.34) 100%);
    pointer-events: none;
}

.page-shell-header p,
.page-shell-header small,
.page-shell-header .text-muted {
    color: rgba(241, 245, 249, 0.84) !important;
}

.page-shell-header i[class^="icon"],
.page-shell-header i[class*=" icon-"],
.page-shell-header .bi {
    text-shadow: 0 1px 2px rgba(2, 6, 23, 0.35);
}

.page-shell-header h4>i:first-child,
.page-shell-header h5>i:first-child,
.page-shell-header h6>i:first-child {
    width: 1.85rem;
    height: 1.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    margin-right: 0.45rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.page-shell-header .nav-link i {
    width: 1.3rem;
    text-align: center;
    opacity: 0.95;
}

.page-shell-header--brand {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--gold {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--forest {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--shipper {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--danger {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--violet {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--slate {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--indigo {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.page-shell-header--success {
    background: linear-gradient(135deg, #101a2f 0%, #182b47 56%, #224066 100%);
}

.figma-admin-landing {
    --landing-surface: #131827;
    --landing-surface-soft: #1a2235;
    --landing-border: rgba(148, 163, 184, 0.2);
    --landing-text: #e5e7eb;
    --landing-muted: #94a3b8;
    --landing-table-head: #0f172a;
    --landing-table-row-hover: rgba(30, 41, 59, 0.75);
    --landing-search-bg: rgba(15, 23, 42, 0.8);
    --landing-overdue-bg: rgba(239, 68, 68, 0.12);
    --landing-subtask-bg: rgba(59, 130, 246, 0.06);
}

.figma-admin-landing .figma-stat-card {
    border-radius: 14px;
    min-height: 70px;
    position: relative;
    overflow: hidden;
    padding: 18px;
    color: #fff;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.34);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.figma-admin-landing .figma-stat-link:hover .figma-stat-card {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.45);
}

.figma-admin-landing .figma-stat-icon {
    font-size: 50px;
    opacity: 0.22;
    position: absolute;
    right: 14px;
    top: 8px;
}

.figma-admin-landing .figma-filter-toggle {
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(30, 41, 59, 0.9);
    color: #dbe7f5;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

.figma-admin-landing .figma-filter-toggle:hover {
    color: #fff;
    background: rgba(51, 65, 85, 0.92);
}

.figma-admin-landing .figma-filter-item {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.77rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 11px 7px 9px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.figma-admin-landing .figma-filter-item:hover {
    border-color: rgba(125, 211, 252, 0.45);
    background: rgba(15, 23, 42, 0.9);
}

.figma-admin-landing .figma-filter-switch {
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.figma-admin-landing .figma-filter-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(2, 6, 23, 0.45);
    transition: transform 0.2s ease;
}

.figma-admin-landing .figma-filter-checkbox:checked~.figma-filter-text {
    color: #f8fafc;
}

.figma-admin-landing .figma-filter-checkbox:focus-visible+.figma-filter-switch {
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.25);
}

.figma-admin-landing .figma-filter-select-wrap .form-control {
    min-width: 170px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.8);
    color: #dbe7f5;
}

.figma-admin-landing .figma-toolbar-select {
    width: 100px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.8);
    color: #dbe7f5;
}

.figma-admin-landing .figma-toolbar-search-wrap input {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: var(--landing-search-bg);
    color: var(--landing-text);
    padding-left: 30px;
}

.figma-admin-landing .figma-task-table thead th {
    border: 0 !important;
    background: var(--landing-table-head);
    color: #94a3b8;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 10px 10px;
    white-space: nowrap;
}

.figma-admin-landing .figma-task-row td {
    border-top: 1px solid rgba(148, 163, 184, 0.15) !important;
    border-bottom: 0 !important;
    color: var(--landing-text);
    font-size: 0.82rem;
    padding: 11px 10px;
    vertical-align: middle;
    background: transparent;
}

.figma-admin-landing .figma-task-row.is-overdue td:first-child {
    box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.82);
}

.figma-admin-landing .figma-col-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.76rem;
    color: #93c5fd;
    white-space: nowrap;
}

.figma-admin-landing .figma-subtask-connector {
    width: 11px;
    height: 11px;
    border-left: 2px solid rgba(148, 163, 184, 0.5);
    border-bottom: 2px solid rgba(148, 163, 184, 0.5);
    border-bottom-left-radius: 4px;
    transform: translateY(-2px);
}

.figma-admin-landing .figma-created-by-icon {
    color: #f8fafc;
    opacity: 0.8;
}

.figma-admin-landing .figma-date-pill.is-overdue {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.26);
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.figma-admin-landing .figma-date-pill.is-today {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.22);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.figma-admin-landing .figma-date-pill.is-ok {
    color: #86efac;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.figma-admin-landing .figma-chip-wrap .operator_block {
    min-height: 24px;
    min-width: 34px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem !important;
    line-height: 1.2;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.figma-admin-landing .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    background: rgba(30, 41, 59, 0.75) !important;
    color: #dbe7f5 !important;
    margin-left: 4px;
}

.figma-admin-landing .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.figma-admin-landing .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: rgba(56, 189, 248, 0.72) !important;
    background: rgba(14, 116, 144, 0.75) !important;
    color: #ffffff !important;
}

.figma-admin-landing .figma-col-tracking .operator_block.operator-block-user {
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-size: 0.68rem !important;
    font-weight: 700;
    background: var(--operator-bg, #3b82f6) !important;
    color: #ffffff !important;
    border: 2px solid var(--landing-surface);
    box-shadow: 0 2px 4px rgba(2, 6, 23, 0.4);
}

.figma-admin-landing .figma-col-tracking .operator_block.operator-block-user .user_operator_content {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.5);
}

.figma-admin-landing .figma-col-status .figma-status-wrap .operator_block.bg-warning {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
}

.figma-admin-landing .figma-col-status .figma-status-wrap .operator_block.bg-success {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
}

.figma-admin-landing .figma-col-status .figma-status-wrap .operator_block.bg-primary {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
    border-color: rgba(59, 130, 246, 0.45) !important;
}

.figma-admin-landing .figma-col-status .figma-status-wrap .operator_block.bg-danger {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fcd34d !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
}

.figma-admin-landing .figma-col-status .figma-status-wrap .operator_block.bg-secondary {
    background: rgba(148, 163, 184, 0.2) !important;
    color: #cbd5e1 !important;
    border-color: rgba(148, 163, 184, 0.4) !important;
}

.figma-admin-landing .figma-col-status .figma-status-wrap .user_operator_content {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.5);
}

.modal.fade .modal-dialog {
    transform: translate(0, 14px) scale(0.985);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.modal-content {
    background: linear-gradient(180deg, #132238 0%, #102034 100%) !important;
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    border-radius: 14px !important;
    box-shadow: 0 28px 56px rgba(2, 6, 23, 0.55) !important;
    overflow: hidden;
}

.modal-header {
    padding: 0.95rem 1.25rem !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24) !important;
    background: rgba(15, 23, 42, 0.52) !important;
    align-items: center;
}

.modal-title {
    color: #f8fbff !important;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.modal-body {
    padding: 1.1rem 1.25rem !important;
    color: #d7e2ef !important;
    font-size: 0.9rem;
    line-height: 1.55;
    background: transparent !important;
}

.modal-footer {
    padding: 0.85rem 1.25rem !important;
    border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
    background: rgba(12, 20, 34, 0.46) !important;
    gap: 0.5rem;
}

.modal .close,
.modal .btn-close {
    color: #c9d8ea !important;
    opacity: 0.88;
    text-shadow: none;
    outline: none;
    box-shadow: none;
    transition: all 0.2s ease;
}

.modal .close:hover,
.modal .btn-close:hover {
    color: #ffffff !important;
    opacity: 1;
    transform: scale(1.06);
}

.modal-backdrop.show {
    background-color: rgba(3, 8, 18, 0.72) !important;
    opacity: 1 !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.toast,
.swal2-popup {
    border-radius: 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.42) !important;
}

.subtask-comm-tabs {
    background: #003260;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0;
}

/* Chat Bubbles */

.chat-bubble {
    width: 80%;
    position: relative;
    padding: 9px 14px 28px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    margin: 0 8px;
    display: inline-block;
    clear: both;
}

/* LEFT bubble (incoming - grey) */

.chat-bubble.float-left {
    background: var(--bg-card-hover) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
    border-radius: 4px 14px 14px 14px !important;
    float: left !important;
}

/* LEFT tail */

.chat-bubble.float-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: -7px;
    width: 0;
    height: 0;
    border-top: 8px solid var(--border-color);
    border-left: 8px solid transparent;
}

.chat-bubble.float-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 0;
    height: 0;
    border-top: 7px solid var(--bg-card-hover);
    border-left: 8px solid transparent;
}

/* RIGHT bubble base — role-coloured */

.chat-bubble.float-right {
    border-radius: 14px 4px 14px 14px !important;
    float: right !important;
}

/* RIGHT tail */

.chat-bubble.float-right::before {
    content: '';
    position: absolute;
    top: 0;
    right: -7px;
    width: 0;
    height: 0;
    border-top: 8px solid rgba(0, 0, 0, 0.25);
    border-right: 8px solid transparent;
}

.chat-bubble.float-right::after {
    content: '';
    position: absolute;
    top: 1px;
    right: -5px;
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
}

/* Role-coloured right bubbles */

.admincomment_list .chat-bubble.float-right::after {
    border-top: 7px solid var(--role-admin);
}

.shippercomment_list .chat-bubble.float-right::after {
    border-top: 7px solid var(--role-shipper);
}

.customer_chat_list .chat-bubble.float-right::after {
    border-top: 7px solid var(--role-customer);
}

/* Meta info — pinned inside bubble bottom-right */

.chat-meta-info {
    position: absolute;
    bottom: 6px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    opacity: 0.75;
    pointer-events: none;
    line-height: 1;
    white-space: nowrap;
}

/* Sender name bold */

.chat-meta-info>span:first-child {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Timestamp */

.chat-meta-info>span.float-right {
    float: none !important;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Three-dot action stays at top-right corner */

.chat-action-wrapper {
    position: absolute;
    top: 6px;
    right: 8px;
}

/* =========================================================================
   Admin Subtask Detail Layout & Components (Dark Mode)
   ========================================================================= */

.task-detail-view {
    display: flex;
    height: calc(100vh - 70px);
    overflow: hidden;
    background: transparent;
    margin: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.task-sidebar {
    width: 38%;
    background: var(--bg-card);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 0;
}

.task-sidebar-inner {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.25rem 0.5rem;
}

.task-collapsible-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.task-collapse-toggle {
    width: 100%;
    border: none;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-radius: 0;
    color: var(--text-main);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none !important;
    background: var(--bg-card-hover);
}

.task-collapse-toggle:hover,
.task-collapse-toggle:focus {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.task-collapsible-card[class*="role-"] .task-collapse-toggle:hover,
.task-collapsible-card[class*="role-"] .task-collapse-toggle:focus {
    filter: brightness(1.05);
}

.task-form-footer {
    padding: 1rem 0;
    margin-top: auto;
    background: var(--bg-card);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    bottom: 0;
    z-index: 3;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.35);
}

.form-section-card {
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-card);
}

.form-section-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.input-group-text {
    background-color: var(--bg-input) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
}

.task-detail-comm {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
}

.task-comm-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.comm-tabs-nav {
    display: flex;
    background: var(--bg-card);
    padding: 0.1rem 0.1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comm-tab-label {
    padding: 0.4rem 1.25rem;
    margin-right: 0.5rem;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.65;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
}

#comm_tab_admin:checked~.comm-tabs-nav .tab-admin,
#comm_tab_partner:checked~.comm-tabs-nav .tab-partner,
#comm_tab_shipper:checked~.comm-tabs-nav .tab-shipper,
#comm_tab_customer:checked~.comm-tabs-nav .tab-customer {
    border-color: rgba(255, 255, 255, 0.05);
    padding-bottom: 0.7rem;
    z-index: 2;
    opacity: 1;
    color: #ffffff;
}

.comm-context-pill {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
}

/* Dark Mode Tinted Badges */

.badge-primary-light {
    background: rgba(41, 121, 255, 0.15);
    color: #70a5ff;
}

.badge-success-light {
    background: rgba(76, 162, 31, 0.15);
    color: #82e44e;
}

.badge-light-success {
    background: rgba(30, 70, 10, 0.2);
    color: #6bbd46;
    border: 1px solid rgba(107, 189, 70, 0.1);
}

.comm-section-nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-card);
}

.comm-section-tab {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.comm-section-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.comm-banner {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.comm-chat-column {
    width: 60%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
}

.comm-doc-column {
    width: 40%;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.task-detail-view .chat-content {
    position: relative;
    line-height: 1.5;
    word-break: break-word;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    max-width: 80% !important;
    margin-bottom: 8px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    /* border: 1px solid rgba(255, 255, 255, 0.05) !important; */
    transition: transform 0.2s ease;
}

.task-detail-view .chat-content.float-left {
    align-self: flex-start;
    float: none !important;
    background: #313842;
    color: #f3f4f6;
    border-bottom-left-radius: 1px;
}

.pane-shipper .task-detail-view .chat-content.float-left {
    background: #383161;
    color: #e5e7eb;
}

.pane-customer .task-detail-view .chat-content.float-left {
    background: #2e5917;
    color: #e5e7eb;
}

.task-detail-view .chat-content.float-left .btn-link,
.task-detail-view .chat-content.float-left i:not(.text-info) {
    color: rgba(255, 255, 255, 0.6) !important;
}

.comm-compose-area {
    padding: 0.4rem;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comm-compose-wrapper {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 0.5rem;
    transition: all 0.2s;
}

.comm-input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.8125rem;
    padding: 0.5rem;
    color: #cbd5e0;
    min-height: 45px;
    max-height: 150px !important;
    resize: none;
    overflow-y: hidden;
}

.comm-compose-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comm-doc-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.comm-doc-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comm-doc-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-card-hover);
}

.comm-doc-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #142c58;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.partner-home-stat-card {
    border-radius: 8px;
    padding: 16px;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.partner-home-stat-title {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    margin-bottom: 2px;
}

.partner-home-stat-value {
    font-size: 28px;
    line-height: 1.1;
    font-weight: 700;
    color: #fff;
}

.partner-home-stat-icon {
    font-size: 28px;
    color: #fff;
    opacity: 0.85;
}

.partner-home-table-card .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

.partner-home-subtext {
    color: #9aa4b4;
}

.comm-doc-name {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comm-upload-area {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.comm-banner.banner-shipper-nav,
.comm-banner.banner-customer-nav {
    margin-left: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.reminder-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.reminder-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

.reminder-card .reminder-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13.5px;
    line-height: 1.55;
    display: block;
    margin-top: 8px;
    padding-left: 2px;
    font-weight: 400;
}

.reminder-card .reminder-message em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
}

.no-reminders {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 40px 20px;
    border-radius: 16px;
    margin: 20px auto;
    max-width: 480px;
}

.no-reminders .icon-container {
    font-size: 48px;
    color: #4a9cce;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-reminders p {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.7);
}

.tab-btn {
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn.active,
.tab-btn:hover {
    color: #fff;
    border-bottom: 2px solid #2979ff;
}

.dash-card {
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none !important;
}

.dash-card-warning {
    background: linear-gradient(135deg, #f6ad17 0%, #d99710 100%);
}

.dash-card-danger {
    background: linear-gradient(135deg, #df4949 0%, #c43a3a 100%);
}

.announcement-banner {
    background: rgba(101, 118, 255, 0.1);
    border-radius: 10px;
    padding: 15px 20px;
    border-left: 4px solid #6576ff;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.announcement-banner p {
    margin: 0;
    font-weight: 500;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}



.chat-role-admin {
    background-color: var(--role-admin-bg) !important;
    border-left: 4px solid var(--role-admin) !important;
    color: #ebf4f5 !important;
}

.chat-role-shipper {
    background-color: var(--role-shipper-bg) !important;
    border-left: 4px solid var(--role-shipper) !important;
    color: #ebf4f5 !important;
}

.chat-role-customer {
    background-color: var(--role-customer-bg) !important;
    border-left: 4px solid var(--role-customer) !important;
    color: #ebf4f5 !important;
}

.chat-role-partner {
    background-color: var(--role-partner-bg) !important;
    border-left: 4px solid var(--role-partner) !important;
    color: #ebf4f5 !important;
}

/* Invert border for right-side messages */

.task-detail-view .chat-meta {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 600 !important;
}

/* ── Dropzone: file upload area ── */

.dropzoneform {
    border: 2px dashed #4b5563 !important;
    background: rgb(3 5 9 / 41%) !important;
    border-radius: 10px !important;
    min-height: 90px !important;
    padding: 10px !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}

.dropzoneform:hover {
    border-color: #74a6ff !important;
    background: rgba(116, 166, 255, 0.1) !important;
}

.dropzoneform .dz-message {
    font-size: 11px;
    color: #9ca3af;
    margin: 8px 0;
    text-align: center;
    order: -1;
    width: 100%;
}

.dropzoneform .dz-preview {
    display: inline-block;
    margin: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    width: 72px;
    height: 72px;
}

.dropzoneform.dz-started .dz-message {
    display: block !important;
    margin: 4px 0;
}

.nl-audience-card {
    border: 2px solid #2d3748;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #1a202c;
}

.nl-audience-card:hover {
    border-color: #2979ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 121, 255, 0.2);
}

.custom-control-input:checked~.nl-audience-card {
    border-color: #2979ff;
    background: rgba(41, 121, 255, 0.1);
    box-shadow: 0 4px 12px rgba(41, 121, 255, 0.25);
}

.nl-editor-container .ql-toolbar.ql-snow {
    border: none !important;
    border-bottom: 1px solid #4a5568 !important;
    background: #2d3748;
    border-radius: 12px 12px 0 0;
}

.nl-editor-container .ql-toolbar.ql-snow .ql-stroke {
    stroke: #e2e8f0 !important;
}

.nl-editor-container .ql-toolbar.ql-snow .ql-fill {
    fill: #e2e8f0 !important;
}

.nl-editor-container .ql-toolbar.ql-snow .ql-picker {
    color: #e2e8f0 !important;
}

.nl-editor-container .ql-container.ql-snow {
    border: none !important;
    background: #1a202c;
    color: #e2e8f0;
}

.nl-editor-container #body {
    background: transparent !important;
    color: inherit !important;
}

.nl-editor-container {
    border: 1px solid #4a5568;
    border-radius: 12px;
    overflow: hidden;
}

.nl-select2 .select2-selection--multiple {
    border-radius: 8px !important;
    border: 1px solid #4a5568 !important;
    background-color: #1a202c !important;
    min-height: 48px !important;
}

.nl-select2 .select2-selection__choice {
    background-color: rgba(41, 121, 255, 0.2) !important;
    border: 1px solid rgba(41, 121, 255, 0.4) !important;
    color: #a1c4fd !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    margin-top: 6px !important;
}

.text-dark-mode-white {
    color: #ffffff;
}

.bg-success-transparent {
    background: rgba(40, 167, 69, 0.15);
}

.bg-light-transparent {
    background: rgba(255, 255, 255, 0.05);
}

.task-details-header {
    border-bottom: 0.5px solid #2d3238;
    padding: 0.5rem 0.5rem;
    margin-bottom: 0;
}

.task-details-header .breadcrumb-small {
    font-size: 11px;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.task-details-header .breadcrumb-small span {
    margin: 0 8px;
    color: #495057;
    font-size: 14px;
}

.task-details-header .task-title {
    font-size: 26px;
    font-weight: 800;
    color: #f8f9fa;
    margin: 0;
    letter-spacing: -0.5px;
}

.task-details-header .status-pill.status-active {
    background-color: rgba(30, 126, 52, 0.2);
    color: #34d058;
}

.task-details-header .status-pill.status-pending {
    background-color: rgba(229, 62, 62, 0.2);
    color: #fc8181;
}

.task-details-header .status-pill.status-paid {
    background-color: rgba(49, 130, 206, 0.2);
    color: #63b3ed;
}

.task-details-header .status-pill.status-complete {
    background-color: rgba(56, 161, 105, 0.2);
    color: #68d391;
}

.task-details-header .btn-action-header {
    background: #272c333d;
    border: 1px solid #383f48;
    color: #dee2e6 !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    cursor: pointer;
}

.task-details-header .btn-action-header:hover {
    background: #2d333b;
    border-color: #448bff;
    color: #448bff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ETA Box - Dark */
:root {
    --eta-box-bg: rgba(255, 255, 255, 0.05); /* Dark color, not black */
    --eta-box-text: rgba(255, 255, 255, 0.85); /* Not plain white */
}
.task-focus-eta-box {
    background-color: var(--eta-box-bg);
    color: var(--eta-box-text);
}

