/* MIHAD admin brand overlay. Restyle only — do not change sidebar collapse markup. */
:root {
  --mihad-olive-deep: #2E351D;
  --mihad-olive: #5D6337;
  --mihad-olive-light: #8A8F62;
  --mihad-olive-muted: #C9CBB4;
  --mihad-peach: #E9A483;
  --mihad-peach-soft: #F3D0BE;
  --mihad-ivory: #FBF7F0;
  --mihad-ivory-soft: #F4EDE2;
  --mihad-surface: #FFFFFF;
  --mihad-text: #2E351D;
  --mihad-text-muted: #6B6A5E;
  --mihad-border: #E4DDD2;
  --mihad-radius: 16px;
  --mihad-radius-sm: 12px;
  --mihad-shadow: 0 8px 24px rgba(46, 53, 29, 0.06);
  --primary: var(--site-color, var(--mihad-olive));
}

html,
body {
  background-color: var(--mihad-ivory) !important;
  color: var(--mihad-text);
}

html.dark,
html.dark body,
body.dark {
  background-color: #11150D !important;
  color: #FBF7F0 !important;
}

.content-page,
.container-fluid {
  background-color: transparent;
}

.mm-navbar,
.iq-top-navbar,
.iq-navbar-custom,
nav.nav-navbar {
  background: var(--mihad-surface) !important;
  border-bottom: 1px solid var(--mihad-border);
  box-shadow: none !important;
}

.mm-sidebar,
.mm-sidebar.sidebar-default {
  background: var(--mihad-surface) !important;
  border-inline-end: 1px solid var(--mihad-border);
}

.mm-sidebar-logo {
  background: var(--mihad-surface) !important;
}

.mm-sidebar-menu .side-menu > li > h6,
.mm-sidebar-menu .navbar-text {
  color: var(--mihad-text-muted) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.mm-sidebar-menu .side-menu li a {
  color: var(--mihad-text) !important;
  border-radius: var(--mihad-radius-sm);
}

.mm-sidebar-menu .side-menu li a:hover,
.mm-sidebar-menu .side-menu li.active > a,
.mm-sidebar-menu .side-menu li a.active,
.mm-sidebar-menu .side-menu li a[aria-expanded="true"] {
  background: rgba(93, 99, 55, 0.1) !important;
  color: var(--mihad-olive-deep) !important;
}

.mm-sidebar-menu .side-menu li a i {
  color: var(--mihad-olive) !important;
}

.mm-sidebar-menu .submenu {
  background: var(--mihad-ivory-soft);
  border-radius: var(--mihad-radius-sm);
}

.mm-sidebar-menu .submenu .nav-link.active,
.mm-sidebar-menu .submenu li.active > a {
  background: rgba(93, 99, 55, 0.14) !important;
  color: var(--mihad-olive-deep) !important;
}

.mm-search-bar input,
.mm-sidebar-menu-search input,
.search-input {
  background: var(--mihad-ivory) !important;
  border: 1px solid var(--mihad-border) !important;
  border-radius: var(--mihad-radius-sm) !important;
  color: var(--mihad-text) !important;
}

.card,
.card-block,
.custom-card {
  background: var(--mihad-surface);
  border: 1px solid var(--mihad-border) !important;
  border-radius: var(--mihad-radius) !important;
  box-shadow: var(--mihad-shadow) !important;
}

.custom-card {
  min-height: 96px;
}

.circle-icon {
  background: rgba(93, 99, 55, 0.1);
  border-radius: 18px;
  color: var(--mihad-olive);
}

.btn-primary,
.btn.btn-primary {
  background-color: var(--mihad-olive) !important;
  border-color: var(--mihad-olive) !important;
  border-radius: var(--mihad-radius-sm) !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--mihad-olive-deep) !important;
  border-color: var(--mihad-olive-deep) !important;
}

.btn-outline-primary {
  color: var(--mihad-olive) !important;
  border-color: var(--mihad-olive) !important;
  border-radius: var(--mihad-radius-sm) !important;
}

.btn-secondary,
.btn-outline-secondary {
  border-radius: var(--mihad-radius-sm) !important;
}

.btn-danger {
  background-color: #B85A4A !important;
  border-color: #B85A4A !important;
}

.btn-info,
.btn.btn-info {
  background-color: var(--mihad-olive-light) !important;
  border-color: var(--mihad-olive-light) !important;
  color: #fff !important;
}

.btn-warning,
.btn.btn-warning {
  background-color: var(--mihad-peach) !important;
  border-color: var(--mihad-peach) !important;
  color: var(--mihad-olive-deep) !important;
}

.form-control,
.select2-container--default .select2-selection--single,
.custom-select {
  border: 1px solid var(--mihad-border) !important;
  border-radius: var(--mihad-radius-sm) !important;
  min-height: 44px;
  background: var(--mihad-surface);
  color: var(--mihad-text);
}

.form-control:focus {
  border-color: var(--mihad-olive) !important;
  box-shadow: 0 0 0 3px rgba(93, 99, 55, 0.15) !important;
}

.badge-success,
.badge.badge-success {
  background: #4A7A55 !important;
}

.badge-warning,
.badge.badge-warning {
  background: #C48A3A !important;
}

.badge-danger,
.badge.badge-danger {
  background: #B85A4A !important;
}

.badge-primary,
.badge.badge-primary {
  background: var(--mihad-olive) !important;
}

.badge-info,
.badge.badge-info,
.badge-light-info {
  background: var(--mihad-olive-muted) !important;
  color: var(--mihad-olive-deep) !important;
}

.alert-info,
.bg-info {
  background-color: var(--mihad-ivory-soft) !important;
  color: var(--mihad-olive-deep) !important;
  border-color: var(--mihad-olive-muted) !important;
}

.dataTables_empty {
  color: var(--mihad-text-muted, #6B6A5E) !important;
  padding: 32px 16px !important;
}

.table thead th,
table.dataTable thead th {
  background: var(--mihad-ivory-soft) !important;
  color: var(--mihad-text) !important;
  border-bottom: 1px solid var(--mihad-border) !important;
  font-weight: 600;
}

.table tbody tr:hover,
table.dataTable tbody tr:hover {
  background: rgba(93, 99, 55, 0.06) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--mihad-border) !important;
  border-radius: var(--mihad-radius-sm) !important;
  min-height: 40px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--mihad-olive) !important;
  border-color: var(--mihad-olive) !important;
  color: #fff !important;
}

.modal-content {
  border-radius: var(--mihad-radius) !important;
  border: 1px solid var(--mihad-border);
}

.modal-header {
  border-bottom-color: var(--mihad-border);
}

.login-content,
.wrapper {
  background: var(--mihad-ivory);
}

.login-content .card {
  border-radius: 20px !important;
  box-shadow: var(--mihad-shadow) !important;
}

.text-primary {
  color: var(--mihad-olive) !important;
}

a.text-primary:hover {
  color: var(--mihad-olive-deep) !important;
}

/* Dark: MIHAD night, not generic black */

.dark .content-page,
.dark .container-fluid {
  background: transparent !important;
}

.dark .mm-sidebar,
.dark .mm-sidebar.sidebar-default,
.dark .mm-sidebar-logo,
.dark .mm-navbar,
.dark .iq-top-navbar {
  background: #1A2013 !important;
  border-color: #3A4130 !important;
}

.dark .card,
.dark .card-block,
.dark .custom-card,
.dark .modal-content {
  background: #1A2013 !important;
  border-color: #3A4130 !important;
  color: #FBF7F0 !important;
}

.dark .table thead th,
.dark table.dataTable thead th {
  background: #242B1A !important;
  color: #FBF7F0 !important;
  border-color: #3A4130 !important;
}

.dark .form-control,
.dark .select2-container--default .select2-selection--single,
.dark .search-input,
.dark .mm-search-bar input {
  background: #242B1A !important;
  border-color: #3A4130 !important;
  color: #FBF7F0 !important;
}

.dark .mm-sidebar-menu .side-menu li a,
.dark .mm-sidebar-menu .side-menu li a i,
.dark .text-body,
.dark .text-muted,
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: #FFFFFF !important;
}

.dark .mm-sidebar-menu .side-menu li a svg,
.dark .sidebar-default .mm-sidebar-menu svg {
  stroke: #FFFFFF !important;
  color: #FFFFFF !important;
  fill: none !important;
}

.dark .mm-sidebar-menu .submenu {
  background: #242B1A;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--mihad-olive-light) !important;
  border-color: var(--mihad-olive-light) !important;
}

.dark table.dataTable tbody td,
.dark .table td,
.dark .table tbody {
  color: #FBF7F0 !important;
  border-color: #3A4130 !important;
}

/* Figma-inspired layout rhythm — MIHAD palette only */
.selected-lang,
.selected-lang-list {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(46, 53, 29, 0.08);
}

.language-menu .dropdown-item-1 a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.header-logo img,
.auth-logo img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

/* Sidebar mark sizing is owned by mihad-admin.css safe-box rules */
.mm-sidebar-logo.mihad-sidebar-brand img {
  max-height: none;
}

.dark .header-logo .light-img,
.dark .auth-logo .light-img,
html.dark .light-logo {
  display: none !important;
}

.dark .header-logo .dark-img,
.dark .auth-logo .dark-img,
html.dark .darkmode-logo {
  display: inline-block !important;
}

.container-fluid > .col-md-12.d-flex.justify-content-between {
  align-items: center;
  margin-bottom: 8px;
}

.container-fluid h4 {
  font-weight: 600;
  color: var(--mihad-olive-deep);
  margin-bottom: 0;
}

.date-range-wrapper {
  width: auto !important;
  min-width: 240px;
  max-width: 360px;
}

.date-range-picker {
  border-radius: 999px !important;
  background: var(--mihad-surface) !important;
  border: 1px solid var(--mihad-border) !important;
  padding-inline: 16px 36px;
  min-height: 44px;
}

.dashboard-counters .custom-card {
  min-height: 97px;
  padding: 16px 20px !important;
  gap: 12px;
}

.dashboard-counters .circle-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(93, 99, 55, 0.1);
  border-radius: 14px;
}

.dashboard-counters .circle-icon svg,
.dashboard-counters .circle-icon img,
.dashboard-counters .custom-svg {
  width: 22px !important;
  height: 22px !important;
}

.dashboard-counters .custom-card h5 {
  font-size: 22px;
  font-weight: 700;
  color: var(--mihad-olive-deep);
  line-height: 1.2;
}

.dashboard-counters .custom-card .text-muted {
  font-size: 13px;
}

.card .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--mihad-border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card .card-header h4,
.card .card-header .card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.card .card-body {
  padding: 16px 20px 20px;
}

.apexcharts-canvas,
.chart-container,
.card canvas {
  max-width: 100%;
}

.btn,
.btn-sm {
  font-weight: 600;
}

table.dataTable thead th {
  padding: 12px 14px !important;
  white-space: nowrap;
}

table.dataTable tbody td {
  padding: 12px 14px !important;
}

.modal-header .btn-close,
.modal .close {
  min-width: 44px;
  min-height: 44px;
}

.dark .container-fluid h4,
.dark .dashboard-counters .custom-card h5 {
  color: #FBF7F0 !important;
}

.dark .selected-lang,
.dark .selected-lang-list {
  box-shadow: 0 0 0 1px rgba(251, 247, 240, 0.18);
}

