﻿:root {
    /* New Palette from Image */
    --lm-primary: #3FBAC2;
    /* Main Color */
    --lm-secondary: #2E2E2E;
    /* Text Lines */
    --lm-accent: #E91E63;
    /* Highlight Accent */
    --lm-supporting: #283593;
    /* Balance Elements */
    --lm-neutral-light: #F5F5F4;
    /* Background Base */
    --lm-sand: #A08E7F;
    /* Desert Sand */

    /* Mappings */
    --lm-primary-light-blue: #e0f2fe;
    /* Keeping this for now, or should it be derived? */
    --lm-text-ink: var(--lm-secondary);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--lm-secondary);
    background-color: var(--lm-neutral-light);
}

html:not(.lm-icons-ready) .material-symbols-outlined,
html:not(.lm-icons-ready) .material-icons,
html:not(.lm-icons-ready) .material-icons-outlined {
    visibility: hidden;
}

html.lm-icons-ready .material-symbols-outlined,
html.lm-icons-ready .material-icons,
html.lm-icons-ready .material-icons-outlined {
    visibility: visible;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
li,
label,
.text-dark,
.text-slate-900,
.text-gray-900 {
    color: var(--lm-secondary);
}

.btn-primary,
.bg-primary {
    background-color: var(--lm-primary) !important;
    border-color: var(--lm-primary) !important;
    color: #fff !important;
}

.btn-primary:hover {
    /* Subtle hover effect */
    background-color: var(--lm-primary) !important;
    border-color: var(--lm-primary) !important;
    filter: brightness(0.9);
}

body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .lm-content,
body.rtl .lm-header,
body.rtl .lm-item {
    direction: rtl;
}

body.rtl .language-selector select {
    text-align: right;
}

.language-selector-wrapper {
    min-width: 140px;
    display: flex;
    align-items: center;
}

.language-selector {
    width: 100%;
}

.language-selector select {
    min-width: 140px;
    padding-inline: .5rem;
}

.language-selector-simple {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
}

body.rtl .language-selector-simple {
    justify-content: flex-start;
}

/* الحاوية العامة */
.lm-shell {
    min-height: 100vh;
    display: flex;
}

/* السايدبار */
/* .lm-sidebar and .lm-header styles moved to sidebar.css to support theming */

/* زر الهامبرجر */
#lm-toggle {
    border: 0;
    background: transparent;
    padding: .4rem;
    border-radius: .5rem;
}

#lm-toggle:hover {
    background: #f3f4f6;
}

/* الـ overlay للجوال */
.lm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 40;
    display: none;
}

.lm-overlay.show {
    display: block;
}

/* منطقة المحتوى */
.lm-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ltr {
    direction: ltr;
    unicode-bidi: plaintext;
    /* يمنع إعادة ترتيب الأرقام/الشرطات في RTL */
}

/* Global Border Styling */
.card,
.lm-card,
.kpi-card,
.table,
.table-responsive,
.lm-content,
.information-Row-Table {
    border: 1px solid rgba(40, 53, 147, 0.3) !important;
    border-radius: 0.5rem;
    /* Optional: adds a slight rounding if not present */
    box-shadow: 0 0 12px rgba(40, 53, 147, 0.15) !important;
}

/* Unified list/dropdown/select styling (light mode) */
.dropdown-menu,
.list-group,
.list-group-item,
.form-select,
.form-control,
.dataTables_length select,
.dataTables_filter input,
.select2-container--bootstrap-5 .select2-selection,
.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 10px;
}

.dropdown-menu {
    border: 1px solid rgba(46, 46, 46, 0.12);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
    padding: 0.35rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
}

.list-group-item {
    border: 1px solid rgba(46, 46, 46, 0.08);
    border-radius: 10px;
    margin-bottom: 0.35rem;
    padding: 0.6rem 0.8rem;
}

.list-group-item:last-child {
    margin-bottom: 0;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border: 1px solid rgba(46, 46, 46, 0.15);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid rgba(46, 46, 46, 0.15);
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
}

/* Unified list/dropdown/select styling (dark mode) */
body.lm-dark-mode .dropdown-menu,
body.lm-dark-mode .list-group,
body.lm-dark-mode .list-group-item,
body.lm-dark-mode .form-select,
body.lm-dark-mode .form-control,
body.lm-dark-mode .dataTables_length select,
body.lm-dark-mode .dataTables_filter input,
body.lm-dark-mode .select2-container--bootstrap-5 .select2-selection,
body.lm-dark-mode .select2-container--bootstrap-5 .select2-dropdown {
    background: #2f2f2f !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode .dropdown-item {
    color: #f1f5f9 !important;
}

body.lm-dark-mode .dropdown-item:hover,
body.lm-dark-mode .dropdown-item:focus {
    background: #3b3b3b !important;
    color: #ffffff !important;
}

body.lm-dark-mode .list-group-item {
    background: #2f2f2f !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.lm-dark-mode .list-group-item-action:hover {
    background: #3b3b3b !important;
}

/* Dark mode overrides (applied globally across layouts) */
body.lm-dark-mode {
    background-color: #2E2E2E !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode h1,
body.lm-dark-mode h2,
body.lm-dark-mode h3,
body.lm-dark-mode h4,
body.lm-dark-mode h5,
body.lm-dark-mode h6,
body.lm-dark-mode p,
body.lm-dark-mode span,
body.lm-dark-mode div,
body.lm-dark-mode a,
body.lm-dark-mode li,
body.lm-dark-mode label,
body.lm-dark-mode th,
body.lm-dark-mode td {
    color: #f1f5f9 !important;
}

body.lm-dark-mode .text-muted,
body.lm-dark-mode .text-secondary,
body.lm-dark-mode .small {
    color: #94a3b8 !important;
}

body.lm-dark-mode .lm-content,
body.lm-dark-mode main,
body.lm-dark-mode .content-category-hotel,
body.lm-dark-mode .Dashboard-home {
    background-color: #2E2E2E !important;
}

body.lm-dark-mode .card,
body.lm-dark-mode .kpi-card,
body.lm-dark-mode .filters-card,
body.lm-dark-mode .shadow-sm,
body.lm-dark-mode .lm-card {
    background-color: #3a3a3a !important;
    color: #f1f5f9 !important;
    border-color: rgba(160, 142, 127, 0.55) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25) !important;
}

body.lm-dark-mode .table {
    color: #f1f5f9 !important;
    border-color: rgba(160, 142, 127, 0.6) !important;
    background-color: #2E2E2E !important;
}

body.lm-dark-mode .table thead th,
body.lm-dark-mode .table-light,
body.lm-dark-mode .table .table-light {
    background-color: #2E2E2E !important;
    border-bottom-color: #A08E7F !important;
    color: #ffffff !important;
}

body.lm-dark-mode .table > :not(caption) > * > * {
    border-color: rgba(160, 142, 127, 0.6) !important;
}

body.lm-dark-mode table.dataTable thead th {
    background-color: #2E2E2E !important;
    color: #ffffff !important;
    border-bottom-color: #A08E7F !important;
}

body.lm-dark-mode table.dataTable {
    background-color: #2E2E2E !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode table.dataTable tbody tr {
    background-color: #3a3a3a !important;
}

body.lm-dark-mode table.dataTable tbody tr:hover {
    background-color: #444444 !important;
}

body.lm-dark-mode table.dataTable tbody td {
    color: #f1f5f9 !important;
    border-color: rgba(160, 142, 127, 0.5) !important;
}

body.lm-dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #353535 !important;
}

body.lm-dark-mode .table-card,
body.lm-dark-mode .table-responsive,
body.lm-dark-mode .information-Row-Table {
    border-color: rgba(160, 142, 127, 0.55) !important;
}

body.lm-dark-mode .table-card,
body.lm-dark-mode .table-responsive {
    border-color: #A08E7F !important;
}

body.lm-dark-mode .bg-light,
body.lm-dark-mode .bg-white {
    background-color: #3a3a3a !important;
}

body.lm-dark-mode .text-dark {
    color: #f1f5f9 !important;
}

body.lm-dark-mode .form-control,
body.lm-dark-mode .form-select,
body.lm-dark-mode input[type="text"],
body.lm-dark-mode input[type="search"],
body.lm-dark-mode input[type="email"],
body.lm-dark-mode input[type="password"],
body.lm-dark-mode textarea,
body.lm-dark-mode select {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #ffffff !important;
}

body.lm-dark-mode .form-control::placeholder {
    color: #cbd5e1 !important;
    opacity: 0.7;
}

body.lm-dark-mode .btn-light,
body.lm-dark-mode .btn-outline-secondary,
body.lm-dark-mode .btn-outline-dark {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode .btn-light:hover,
body.lm-dark-mode .btn-outline-secondary:hover,
body.lm-dark-mode .btn-outline-dark:hover {
    background-color: #4a4a4a !important;
}

body.lm-dark-mode .dropdown-menu {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
}

body.lm-dark-mode .dropdown-item {
    color: #f1f5f9 !important;
}

body.lm-dark-mode .dropdown-item:hover,
body.lm-dark-mode .dropdown-item:focus {
    background-color: #4a4a4a !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode .lm-header {
    background-color: #2E2E2E !important;
    color: #ffffff !important;
    border-bottom: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.lm-dark-mode .lm-header h1,
body.lm-dark-mode .lm-header h2,
body.lm-dark-mode .lm-header h3,
body.lm-dark-mode .lm-header h4,
body.lm-dark-mode .lm-header h5,
body.lm-dark-mode .lm-header h6,
body.lm-dark-mode .lm-header p,
body.lm-dark-mode .lm-header span,
body.lm-dark-mode .lm-header div,
body.lm-dark-mode .lm-header .btn-link,
body.lm-dark-mode .lm-header button.btn-link,
body.lm-dark-mode .lm-header #lm-toggle,
body.lm-dark-mode .lm-header .material-symbols-outlined {
    color: #ffffff !important;
}

body.lm-dark-mode .navbar,
body.lm-dark-mode .navbar-light,
body.lm-dark-mode .navbar .dropdown-menu {
    background-color: #2E2E2E !important;
    border-color: #4a4a4a !important;
}

body.lm-dark-mode .navbar .nav-link,
body.lm-dark-mode .navbar .navbar-brand,
body.lm-dark-mode .navbar .dropdown-item {
    color: #ffffff !important;
}

body.lm-dark-mode .navbar .dropdown-item:hover,
body.lm-dark-mode .navbar .dropdown-item:focus {
    background-color: #3a3a3a !important;
}

body.lm-dark-mode .lm-logo {
    filter: brightness(0) invert(1);
}

body.lm-dark-mode .signup-shell,
body.lm-dark-mode .login-page,
body.lm-dark-mode .master-home {
    background-color: #2E2E2E !important;
}

body.lm-dark-mode .signup-header {
    background: rgba(58, 58, 58, 0.95) !important;
    border-color: #4a4a4a !important;
}

body.lm-dark-mode .soft-input {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode .soft-input::placeholder {
    color: #cbd5e1 !important;
}

body.lm-dark-mode .icon-circle {
    background-color: #A08E7F !important;
    border: 1px solid #A08E7F !important;
}

body.lm-dark-mode .icon-circle .material-symbols-outlined {
    color: #ffffff !important;
}

body.lm-dark-mode .stats-row .stat-card,
body.lm-dark-mode .filters-wrapper .filters-card,
body.lm-dark-mode .table-card {
    border-color: rgba(160, 142, 127, 0.55) !important;
    background-color: #3a3a3a !important;
}

body.lm-dark-mode .lm-content,
body.lm-dark-mode .information-Row-Table {
    border-color: rgba(160, 142, 127, 0.45) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.lm-dark-mode .accordion,
body.lm-dark-mode .accordion-item,
body.lm-dark-mode .accordion-header,
body.lm-dark-mode .accordion-button,
body.lm-dark-mode .accordion-body {
    background-color: #3a3a3a !important;
    color: #f1f5f9 !important;
}

body.lm-dark-mode .accordion-item {
    border-color: rgba(160, 142, 127, 0.55) !important;
}

body.lm-dark-mode .accordion-button:not(.collapsed) {
    background-color: #3f3f3f !important;
    color: #ffffff !important;
}

body.lm-dark-mode .accordion-button::after {
    filter: invert(1);
}

body.lm-dark-mode .accordion-button .material-symbols-outlined,
body.lm-dark-mode .accordion-button .bi {
    color: #ffffff !important;
}

body.lm-dark-mode .btn-apply,
body.lm-dark-mode .btn-filter,
body.lm-dark-mode .js-dep-apply,
body.lm-dark-mode #btnApplyFilters,
body.lm-dark-mode .btn-outline-primary {
    background-color: #3FBAC2 !important;
    border-color: #3FBAC2 !important;
    color: #ffffff !important;
}

body.lm-dark-mode .btn-apply:hover,
body.lm-dark-mode .btn-filter:hover,
body.lm-dark-mode .js-dep-apply:hover,
body.lm-dark-mode #btnApplyFilters:hover,
body.lm-dark-mode .btn-outline-primary:hover {
    background-color: #33a6ad !important;
    border-color: #33a6ad !important;
    color: #ffffff !important;
}

body.lm-dark-mode .table,
body.lm-dark-mode .table-bordered,
body.lm-dark-mode .table-hover,
body.lm-dark-mode .table-striped {
    background-color: #2E2E2E !important;
    color: #ffffff !important;
}

body.lm-dark-mode .table td,
body.lm-dark-mode .table th {
    color: #ffffff !important;
}

body.lm-dark-mode .dataTable thead .sorting:before,
body.lm-dark-mode .dataTable thead .sorting:after,
body.lm-dark-mode .dataTable thead .sorting_asc:before,
body.lm-dark-mode .dataTable thead .sorting_asc:after,
body.lm-dark-mode .dataTable thead .sorting_desc:before,
body.lm-dark-mode .dataTable thead .sorting_desc:after {
    color: #ffffff !important;
}

body.lm-dark-mode .badge.bg-open,
body.lm-dark-mode .badge.bg-pending,
body.lm-dark-mode .badge.bg-Completed,
body.lm-dark-mode .badge.bg-defer {
    color: #1f1f1f !important;
}

body.lm-dark-mode .badge.bg-process,
body.lm-dark-mode .badge.bg-Hold,
body.lm-dark-mode .badge.bg-overdue,
body.lm-dark-mode .badge.bg-Closed {
    color: #ffffff !important;
}
