/* Minimal View Mode for Iframes */
.minimal-view .mac-panel-sidebar,
.minimal-view .mac-panel-topbar {
  display: none !important;
}

.minimal-view .mac-window {
  margin: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: white !important;
}

.minimal-view .mac-panel-content {
  border-radius: 0 !important;
}

/* Mac panel layout (sidebar + content) */
.mac-window {
  width: calc(100% - 10px) !important;
  margin: 6px 6px calc(var(--dock-icon-size, 60px) * 2.1) 6px !important;
  height: calc(100vh - (var(--dock-icon-size, 60px) * 2.1 + 10px)) !important;
  background: #f8f4f4;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  overflow: hidden !important;
  position: relative;
  z-index: 100;
  border: 1px solid #d1d1d1;
}

.role-assessor .mac-panel-topbar {
  border-radius: 24px 24px 0 0 !important;
}

.role-assessor .mac-window {
  height: calc(100vh - 20px) !important;
  width: calc(100% - 20px) !important;
  margin: 10px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2) !important;
  overflow: hidden !important;
  isolation: isolate; /* Force stacking context for better clipping */
}

.role-assessor .mac-panel-content {
  border-radius: 24px !important;
}

.role-assessor .wrapper.mac-glass-bg {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.role-assessor .mac-panel-topbar {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.mac-panel-sidebar {
  width: 210px;
  background: var(--mac-sidebar-bg, linear-gradient(180deg, #efefef, #e7e4e4));
  border-right: 1px solid var(--mac-border, #f0f0f0);
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  transition: width .36s cubic-bezier(.43, 1, .4, 1);
  border-radius: 14px 0 0 14px;
  z-index: 12000;
  /* Highest priority to cover Select2 */
}

.mac-panel-sidebar::-webkit-scrollbar {
  width: 5px;
}

.mac-panel-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.mac-panel-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.mac-panel-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

.mac-panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.mac-panel-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 15px 25px 15px;
}

.mac-panel-chrome .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 14px;
  box-sizing: content-box;
}

.mac-panel-chrome .dot-red {
  background: #ff5f57;
}

.mac-panel-chrome .dot-yellow {
  background: #febc2e;
}

.mac-panel-chrome .dot-green {
  background: #28c840;
}

.mac-panel-chrome .status-pill {
  margin-left: auto;
  background: #e9f1ff;
  color: #0c57e0;
  font-weight: 700;
  font-size: 12px;
  border-radius: 8px;
  padding: 2px 6px;
}

.mob-close-btn {
  display: none;
  margin-left: auto;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #555;
  cursor: pointer;
  padding: 2px 6px;
}

.mac-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mac-nav-section {
  margin: 12px 8px 6px 8px;
  padding: 6px 8px;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
  color: #6c6c6c;
  text-transform: uppercase;
}

.mac-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #222;
  font-weight: 600;
  transition: all .2s;
}

.mac-nav-item.active {
  background: linear-gradient(90deg, #ffffff 30%, #f6f4f4 80%, #eeeae9 100%);
  color: #111;
  border: 0;
  box-shadow: none;
  border-radius: 16px;
  padding: 14px 16px;
}

.mac-nav-item.active .mac-nav-icon i {
  color: #e63b68 !important;
}

.mac-nav-item.active .mac-nav-label {
  color: #e63b68 !important;
  font-weight: 800 !important;
}

.mac-kebab {
  position: relative;
}

/* Ensure all dropdown menus appear on top layer */
.mac-icon-btn.edit,
.mac-icon-btn.danger,
.mac-icon-btn.more {
  background: transparent !important;
}

/* Select2 dropdown fixes */
.select2-dropdown {
  overflow: visible !important;
  min-height: 100px !important;
  margin-top: 4px !important;
  position: absolute !important;
  z-index: 999995 !important;
  /* Below dock/flyouts (9999999) */
  background: #ffffff !important;
  border: 1px solid #d2d2d7 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.select2-results {
  max-height: 300px !important;
  overflow-y: auto !important;
}

.select2-results__option {
  padding: 8px 12px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #007aff !important;
}

/* Force Select2 containers to be visible */
.select2-container--open {
  z-index: 999995 !important;
}

/* Ensure dropdown body is not clipped */
.select2-container--open .select2-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Selection styling */
.select2-container--default .select2-selection--single {
  height: 40px !important;
  border: 1.5px solid #e0e0e0 !important;
  border-radius: 10px !important;
  background-color: #fcfcfc !important;
  display: flex !important;
  align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px !important;
  padding-left: 14px !important;
  color: #333 !important;
  font-size: 14px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
  right: 10px !important;
}

/* Global dropdown visibility fix */
body {
  overflow-x: hidden;
}

.mac-window,
.mac-panel-content {
  overflow: visible !important;
}

.mac-kebab-menu {
  position: absolute;
  left: 0;
  right: auto;
  top: 38px;
  min-width: 200px;
  max-height: 280px;
  background: #ffffff;
  border: 1px solid #e9e9e9;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
  display: none;
  overflow: auto;
  z-index: 999999;
  padding: 6px 0;
}

.mac-kebab-menu.show {
  display: block;
}

.mac-kebab-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.mac-kebab-header {
  display: none;
}

.mac-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 6px 0;
}

.mac-kebab-item {
  display: block;
  padding: 10px 18px;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  white-space: nowrap;
  width: 100%;
  text-align: left;
}

.mac-kebab-item:hover {
  background: #f7f7f7;
  color: #000;
  text-decoration: none;
}

.mac-kebab-menu a {
  color: #000 !important;
  text-decoration: none !important;
}

.mac-kebab-item:hover {
  background: #f5f5f5;
}

.mac-user-dropdown a {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: #222;
  font-weight: 700;
  font-size: 13px;
}

.mac-user-dropdown a:hover {
  background: #f5f5f5;
}

.mac-actions {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mac-actions a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  border: none !important;
}

.mac-actions a.edit {
  background: rgba(0, 122, 255, 0.1) !important;
  color: #007aff !important;
}

.mac-actions a.edit:hover {
  background: #007aff !important;
  color: #fff !important;
  transform: scale(1.15);
}

.mac-actions a.delete {
  background: rgba(255, 59, 48, 0.1) !important;
  color: #ff3b30 !important;
}

.mac-actions a.delete:hover {
  background: #ff3b30 !important;
  color: #fff !important;
  transform: scale(1.15);
}

.mac-actions a.view {
  background: rgba(52, 199, 89, 0.1) !important;
  color: #34c759 !important;
}


.mac-actions a.view:hover {
  background: #34c759 !important;
  color: #fff !important;
  transform: scale(1.15);
}

/* Blue chip buttons for report links */
.mac-chip {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: #3C8DBC;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .3px;
  text-decoration: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .23);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.mac-chip:hover {
  background: #3C8DBC;
  color: #fff;
  text-decoration: none;
}

.mac-chip.mac-chip-blue {
  background: #3C8DBC;
  margin: 2px;
}

.mac-list-toolbar {
  padding: 0px 50px 10px 50px;
}

/* Keep icon accent color on active */
.mac-nav-item.active .mac-nav-icon {
  color: #e63b68;
}

.mac-nav-icon {
  width: 18px;
  text-align: center;
  color: #e63b68;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mac-nav-icon img {
  width: 18px;
  height: 18px;
  display: block;
}

.mac-panel-content {
  flex: 1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: 0 14px 14px 0;
}

.mac-panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 50px;
  background: var(--mac-top-nav-bg, #FDF5F3);
  border-bottom: 2px solid var(--mac-border, #E6E6E6);
  margin-bottom: 0px;
}

.mac-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  position: relative;
}

.mac-panel-title {
  font-size: 24px;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.5px;
}

.mac-panel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.datepicker-dropdown {
  border: 1px solid #e2e2e2;
  border-radius: 18px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  padding: 12px;
}

.datepicker-dropdown:before,
.datepicker-dropdown:after {
  display: none;
}

.datepicker table tr td,
.datepicker table tr th {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  text-align: center;
  font-weight: 600;
}

.datepicker table tr td.day:hover,
.datepicker table tr td.day.focused {
  background: #3c8dbc56;
  color: #3C8DBC;
}

.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.today {
  background: #3C8DBC !important;
  color: #fff !important;
}

.year-badge {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  text-align: center;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}

.mac-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 0px;
  padding: 13px 50px 12px 50px;
  background: #fff;
  border-bottom: 1px solid #ECECEC;
}

.mac-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.mac-tool-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f5f5f7;
  padding: 4px 8px;
  border-radius: 12px;
}

.mac-report-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 10px 10px 50px;
  background: #fff;
}

.mac-search {
  flex: 1;
  position: relative;
}

.mac-search input {
  width: 100%;
  max-width: 600px;
  border-radius: 24px;
  border: 1.5px solid #dbdbdb;
  padding: 10px 14px 10px 36px;
  box-shadow: inset 2px 2px 10px rgba(0, 0, 0, 0.2);
  outline: none;
  background: #fcfcfc;
  font-size: 16px;
}

.mac-search .fa-search {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b6b6b6;
  font-size: 16px;
  pointer-events: none;
}

.btn-pill {
  border: none;
  border-radius: 22px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  display: inline-flex;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.4);
  align-items: center;
  gap: 8px;
}

.btn-green {
  background: #10a561;
  color: #fff;
}

.mac-tool-btn {
  width: 42px;
  height: 42px;
  border-radius: 20px;
  background: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.4);
  text-decoration: none !important;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.mac-tool-btn svg {
  display: block;
}

.mac-tool-btn:hover {
  transform: translateY(-2px);
  box-shadow: inset 5px 5px 8px rgba(0, 0, 0, 0.2);
}

.mac-tool-btn i {
  font-size: 18px;
}


.mac-card-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  max-width: 100%;
  min-height: 0;
}

#data_display {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0 0px;
  min-height: 0;
  background: #fff;
}

.mac-table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.dataTables_wrapper {
  width: 100% !important;
  max-width: unset !important;
}

.mac-table thead th {
  font-weight: 700;
  color: #2b2b2b;
  padding: 16px 14px;
  border-bottom: 2px solid #D8D8D8;
  border-top: 2px solid #D8D8D8;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
}

.mac-col-action {
  width: 160px;
  min-width: 160px;
  text-align: center !important;
}

.mac-action-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e1e1e1;
  color: #555;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: #fcfcfc;
}

.action-btn.view:hover {
  color: #34c759;
  border-color: #34c759;
}

.action-btn.edit:hover {
  color: #007aff;
  border-color: #007aff;
}

.action-btn.delete:hover {
  color: #ff3b30;
  border-color: #ff3b30;
}

.action-btn.more:hover {
  color: #5856d6;
  border-color: #5856d6;
}

.mac-table thead th:not(:first-child) {
  border-left: 1px solid #E6E6E6;
}

.mac-table tbody tr {
  background: #fff;
  box-shadow: none;
}

.mac-blank-row td {
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid #f2f2f2;
  pointer-events: none;
  color: transparent !important;
  font-weight: 700;
}

.mac-blank-row:hover {
  background: #fff !important;
}

.mac-blank-row:nth-child(even) {
  background: #fff;
}

.mac-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid #f2f2f2;
  vertical-align: middle;
  text-align: center;
  font-weight: 700;
}

.mac-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.mac-table tbody tr:nth-child(even) {
  background: #F5F5F5;
}

.mac-table tbody {
  border-bottom: 2px solid #D8D8D8;
  border-top: 2px solid #D8D8D8;
}

a:hover,
a:active,
a:focus {
  outline: none;
  text-decoration: none;
  /* color: #ffffff; */
  /* transform: scale(1.1); */
}

/* --- MAC FORM STYLES --- */
.mac-btn-submit {
  background: #10a561;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(16, 165, 97, 0.2);
}

.mac-btn-submit:hover {
  background: #0d8a51;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 165, 97, 0.3);
}

.mac-btn-cancel {
  background: #f1f1f1;
  color: #333;
  border: 1px solid #ddd;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  margin-right: 10px;
}

.mac-btn-cancel:hover {
  background: #e4e4e4;
  text-decoration: none;
  color: #333;
}

.mac-form-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #eaeaea;
}

.mac-form-group {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  gap: 20px;
}

.mac-form-col {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
}

.mac-label {
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.mac-input,
.mac-select,
.mac-date-input {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid #e0e0e0;
  padding: 10px 14px;
  background: #fcfcfc;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
  outline: none;
}

.mac-input:focus,
.mac-select:focus,
.mac-date-input:focus {
  border-color: #3C8DBC;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mac-input::placeholder,
.mac-date-input::placeholder {
  color: #a0a0a0;
  font-weight: 500;
}

.mac-date-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.mac-date-icon {
  position: absolute;
  right: 14px;
  color: #888;
  pointer-events: none;
}

.mac-divider {
  border: 0;
  height: 1px;
  background: #eee;
  margin: 24px 0;
}

.mac-form-card input[type="file"] {
  text-align: center;
  padding: 6px 10px !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Enhance Select2 to match Mac design */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-radius: 10px !important;
  border: 1.5px solid #e0e0e0 !important;
  background: #fcfcfc !important;
  min-height: 42px !important;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #3C8DBC !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(60, 141, 188, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px !important;
  color: #333 !important;
  padding-left: 14px !important;
  font-size: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px !important;
  right: 8px !important;
}

/* Multiple Select Pills */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: linear-gradient(135deg, #3884B0, #3884B0) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 16px !important;
  padding: 8px 12px !important;
  margin-top: 6px !important;
  margin-left: 6px !important;
  margin-right: 2px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  box-shadow: 0 2px 5px rgba(30, 136, 229, 0.3) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: rgba(255, 255, 255, 0.8) !important;
  margin-right: 6px !important;
  border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
  padding-right: 6px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  background: transparent !important;
  color: #fff !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
  margin-top: 8px !important;
  margin-left: 10px !important;
  font-family: inherit;
  color: #333;
}

.select2-dropdown {
  border-radius: 12px !important;
  border: 1px solid #e0e0e0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #3C8DBC !important;
}

.mac-actions {
  display: flex !important;
}

.mac-actions a:not(.mac-icon-btn) {
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent !important;
  color: #1e6fff;
  margin-right: 6px;
  /* transition:all .15s; */
  text-decoration: none;
}

.mac-actions a:not(.mac-icon-btn):hover {
  background: transparent !important;
  box-shadow: none !important;
}

.mac-breadcrumb {
  padding: 12px 4px;
  color: #6c6c6c;
  font-weight: 600;
}

.mac-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 0;
}

.mac-pagination .page {
  color: #e63b68;
  font-weight: 700;
}

/* DataTables skin to look like Mac table */
#data_display .dataTables_wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Hide original info and paginate as we move them to the custom footer */
#data_display .dataTables_info,
#data_display .dataTables_paginate {
  display: none !important;
}

#data_display .dataTables_wrapper .dt-buttons,
#data_display .dataTables_wrapper .dataTables_filter label {
  display: none !important;
}

#data_display table.dataTable {
  width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: transparent;
}

#data_display table.dataTable tbody tr {
  border-spacing: 0 !important;
}

/* Mirror zebra rows on DataTables selectors to avoid overrides */
#data_display table.dataTable tbody tr:nth-child(odd) {
  background: #ffffff !important;
}

#data_display table.dataTable tbody tr:nth-child(even) {
  background: #F5F5F5 !important;
}

#data_display table.dataTable tbody tr.odd {
  background: #ffffff !important;
}

#data_display table.dataTable tbody tr.even {
  background: #F5F5F5 !important;
}

#data_display table.dataTable tbody tr:nth-child(odd)>td {
  background: #ffffff !important;
}

#data_display table.dataTable tbody tr:nth-child(even)>td {
  background: #F5F5F5 !important;
}

#data_display table.dataTable tbody tr.odd>td {
  background: #ffffff !important;
}

#data_display table.dataTable tbody tr.even>td {
  background: #F5F5F5 !important;
}

#data_display table.dataTable tbody td {
  padding: 8px 8px;
}

/* DataTables defaults */
#data_display .dataTables_paginate {
  display: block;
  text-align: right;
}

#data_display .dataTables_info {
  padding: 10px 0;
}

/* Align date columns and narrow Action column */
.mac-col-center {
  text-align: center;
}

/* .mac-col-action { width:120px; } */

.mac-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 20px;
  background: #fff;
  border-top: 2px solid #D8D8D8;
  border-radius: 0 0 14px 0;
  z-index: 10;
  min-height: 35px;
}

.mac-footer-info {
  color: #666;
  font-size: 13px;
  font-weight: 500;
}

.mac-footer-info .dataTables_info {
  display: block !important;
  padding: 0 !important;
}

.mac-pagination-custom {
  display: flex;
  gap: 20px;
  align-items: center;
}

.mac-pagination-custom .page-nav {
  color: #333;
  font-size: 18px;
  font-weight: 900;
  text-decoration: none !important;
}

.mac-pagination-custom .page-num {
  color: #e63b68;
  font-weight: 800;
  font-size: 16px;
}

/* DataTables pagination in footer */
#footer-table-pagination .dataTables_paginate {
  display: block !important;
  padding: 0 !important;
}

#footer-table-pagination .paginate_button {
  padding: 4px 15px !important;
  border: none !important;
  background: transparent !important;
  color: #333 !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.mac-input[readonly] {
  background-color: #f5f5f7 !important;
  color: #86868b !important;
  pointer-events: none;
  border-radius: 20px !important;
}

.mac-input,
.mac-select {
  width: 100% !important;
  border-radius: 6px !important;
  border: 1px solid #d1d1d6 !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  height: 38px !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: 20px !important;
}

#footer-table-pagination .paginate_button.current {
  color: #e63b68 !important;
  background: transparent !important;
  border: none !important;
}

#footer-table-pagination .paginate_button.disabled {
  opacity: 1 !important;
  cursor: default;
}

#footer-table-pagination .paginate_button svg path {
  fill: #000000 !important;
  opacity: 1 !important;
}

#footer-table-pagination .paginate_button.disabled svg path {
  fill: #000000 !important;
  opacity: 1 !important;
}

.mac-pagination-custom .page-dot {
  color: #000000;
  font-weight: 700;
  border-radius: 50%;
  padding: 4px 14px;
  background: transparent;
  transition: .12s;
  cursor: pointer;
  font-size: 15px;
  min-width: 26px;
  text-align: center;
}

.mac-pagination-custom .page-dot.active,
.mac-pagination-custom .page-dot.selected {
  /* background: #ffc1ce; */
  color: #e63b68;
}

.mac-breadcrumb-custom {
  color: #555;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mac-breadcrumb-custom a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.mac-breadcrumb-custom a:hover {
  color: #e63b68;
}

.mac-breadcrumb-custom i {
  font-size: 16px;
  color: #333;
}

.mac-table th,
.mac-table td {
  color: #111 !important;
}

.mac-search {
  position: relative;
}

.mac-search input {
  border: 1.5px solid #dbdbdb;
  color: #111;
  background: #fcfcfc;
  font-size: 16px;
  padding-left: 36px;
}

.mac-search .fa-search {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #b6b6b6;
  font-size: 17px;
  pointer-events: none;
  z-index: 2;
}

.mac-panel-sidebar {
  border-radius: 14px 0px 0px 14px;
}

.mac-panel-content {
  border-radius: 0px 14px 14px 0px;
}

.mac-panel-topbar {
  border-radius: 14px 14px 0px 0px;
}

/* Sidebar Collapse Tweaks */
.mac-panel-sidebar.collapsed {
  min-width: 72px !important;
  width: 72px !important;
  max-width: 72px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  transition: width .36s cubic-bezier(.43, 1, .4, 1);
  padding-left: 0;
  padding-right: 0;
}

.mac-panel-sidebar.collapsed .mac-panel-chrome {
  justify-content: center;
  gap: 8px;
}

.mac-panel-sidebar.collapsed .dot {
  margin-left: 0;
  margin-right: 0;
}

.mac-panel-sidebar.collapsed .status-pill#sidebar-toggle-btn {
  display: none !important;
}

.mac-panel-sidebar.collapsed #sidebar-collapsed-restore {
  display: flex !important;
}

#sidebar-collapsed-restore {
  display: none;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.mac-panel-sidebar.collapsed #sidebar-restore-inline {
  display: inline-flex !important;
}

#sidebar-restore-inline {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.mac-panel-sidebar.collapsed #sidebar-toggle-btn {
  display: none !important;
}

/* Simplify icons when collapsed: no background on active */
.mac-panel-sidebar.collapsed .mac-nav-item.active,
.mac-panel-sidebar.collapsed .mac-nav-item.active:hover {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 10px 0 !important;
}

.mac-panel-sidebar.collapsed .mac-nav-item .mac-nav-icon {
  color: #e63b68;
}

.mac-panel-sidebar .mac-nav-label {
  display: inline !important;
  transition: opacity .28s;
}

.mac-panel-sidebar.collapsed .mac-nav-label {
  display: none !important;
}

.mac-panel-sidebar .mac-nav-item {
  justify-content: flex-start;
  gap: 12px;
}

.mac-panel-sidebar.collapsed .mac-nav-item {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  gap: 0;
}

.mac-panel-sidebar.collapsed .mac-nav-icon {
  margin: 0 auto !important;
  display: flex;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 20px;
}

.mac-panel-sidebar.collapsed .mac-nav-icon img {
  width: 20px;
  height: 20px;
}

.mac-panel-content.sidebar-collapsed {
  width: 100% !important;
  margin-left: 0 !important;
  transition: margin-left .36s cubic-bezier(.43, 1, .4, 1);
}

.mac-panel-sidebar.collapsed:hover {
  background: linear-gradient(180deg, #ececec 80%, #dfdcdc 100%);
}

/* End Sidebar Collapse Tweaks */

/* Responsive layout */
@media (max-width: 1200px) {
  .mac-panel-sidebar {
    width: 200px;
  }

  .mac-search input {
    width: 100%;
  }

  .mac-table {
    min-width: 800px;
  }
}

@media (max-width: 991px) {
  .mac-window {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 105px);
  }

  /* Off-canvas sidebar */
  .mac-panel-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    max-width: 80%;
    border-bottom: none;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform .28s ease;
  }

  body.mac-sidebar-open .mac-panel-sidebar {
    transform: translateX(0);
  }

  .mac-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .25);
    z-index: 1040;
    display: none;
  }

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

  .mac-panel-topbar {
    padding: 12px 16px;
  }

  .mob-close-btn {
    display: inline-block;
  }

  .mac-panel-content {
    max-height: none;
    padding-bottom: 90px;
  }

  .mac-toolbar {
    flex-wrap: wrap;
    padding: 10px 16px;
  }

  .mac-search {
    flex: 1 1 100%;
    order: 1;
  }

  .mac-search input {
    width: 100%;
  }

  .btn-pill {
    padding: 8px 10px;
    order: 2;
  }

  .mac-panel-meta {
    margin-left: auto;
    gap: 10px;
  }

  .year-badge {
    font-size: 16px;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .mac-card-table {
    overflow-x: auto;
  }
}


/* Mac Form Styling */
/* Mac Form Styling */
.mac-form-card {
  background: #F5F5F5;
  border-radius: 18px;
  padding: 22px 22px 16px;
  box-shadow: 0 6px 14px rgb(0 0 0 / 18%);
  max-width: 700px;
  /* margin: 40px auto; */
  /* border: 1px solid #f0f0f0; */
}

.mac-form-row {
  display: flex;
  gap: 30px;
  margin-bottom: 24px;
}

.mac-form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mac-label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-left: 2px;
}

.mac-input {
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 1.5px solid #e1e1e1;
  border-radius: 30px;
  font-size: 15px;
  color: #333;
  transition: all 0.2s;
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.37);
}

input[type="file"].mac-input {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  height: auto;
}

input[type="file"].mac-input::file-selector-button {
  border: 1px solid #dcdcdc;
  background: linear-gradient(180deg, #ffffff 0%, #f1f1f1 100%);
  padding: 8px 16px;
  border-radius: 20px;
  color: #333;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-right: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

input[type="file"].mac-input::file-selector-button:hover {
  background: #f8f8f8;
  border-color: #ccc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

input[type="file"].mac-input::file-selector-button:active {
  background: #ececec;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* .mac-input:focus {
  background: #fff;
  border-color: #e63b68;
  box-shadow: 0 0 0 4px rgba(230, 59, 104, 0.1);
} */

.mac-select {
  width: 100%;
  padding: 14px 20px;
  background-color: #fff;
  border: 1.5px solid #e1e1e1;
  border-radius: 30px;
  font-size: 15px;
  color: #333;
  transition: all 0.2s;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  cursor: pointer;
}

.mac-select:focus {
  background-color: #fff;
  border-color: #e63b68;
  box-shadow: 0 0 0 4px rgba(230, 59, 104, 0.1);
}

/* Select2 Overrides for Mac Design */
.mac-form-card .select2-container {
  width: 100% !important;
  display: block;
}

.mac-form-card .select2-container .select2-selection--single {
  height: 48px;
  border-radius: 30px !important;
  border: 1.5px solid #dcdcdc;
  background-color: #fff;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.37);
  display: flex;
  align-items: center;
  outline: none;
  transition: all 0.2s;
}

.mac-form-card .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 20px;
  padding-right: 30px;
  color: #333;
  font-size: 15px;
  line-height: normal;
  font-weight: 500;
}

.mac-form-card .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
  right: 15px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mac-form-card .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-width: 6px 5px 0 5px;
  border-color: #888 transparent transparent transparent;
  margin-top: -2px;
}

/* Open State */
/* .mac-form-card .select2-container--open .select2-selection--single {
  border-color: #e63b68;
  box-shadow: 0 0 0 4px rgba(230, 59, 104, 0.1);
} */

/* Dropdown Menu */
.select2-dropdown {
  border: 1px solid #f0f0f0 !important;
  border-radius: 0px 0px 14px 14px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden;
  z-index: 9001 !important;
  /* Lower than profile dropdown and dock */
  padding: 6px;
  background: white;
  margin-top: 8px;
}

.select2-results__option {
  padding: 10px 15px !important;
  font-size: 14px;
  border-radius: 8px;
  margin-bottom: 2px;
  color: #444;
  font-weight: 500;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #f5f5f5 !important;
  color: #000 !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: #e9f1ff !important;
  /* Selected item bg */
  color: #0c57e0 !important;
}

.mac-btn-submit {
  background: #10a561;
  color: white;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 30px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 10px rgba(16, 165, 97, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mac-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(16, 165, 97, 0.3);
  background: #0d9656;
}

@media (max-width: 768px) {
  .mac-panel-title {
    font-size: 20px;
  }

  .year-badge {
    font-size: 14px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .mac-table {
    min-width: 680px;
  }

  .mac-card-footer {
    padding: 10px 12px;
  }
}

@media (max-width: 576px) {
  .mac-window {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 105px);
  }

  .mac-card-table {
    /* position: absolute; */
    left: 0px;
    top: 0px;
    width: 100%;
    padding: 0px;
    border-radius: 0px;
    border: 1px solid var(--mac-border);
    background: var(--mac-surface);
    backdrop-filter: blur(var(--mac-blur));
    -webkit-backdrop-filter: blur(var(--mac-blur));
  }

  .mac-panel-content {
    padding-bottom: 0px;
    overflow: auto;
  }



  .mac-card-table {
    padding-bottom: 0px;
  }

  .mac-panel-title {
    font-size: 18px;
  }

  /* keep buttons auto-width on small screens */
  .btn-pill {
    width: auto;
    margin-top: 0;
  }

  .mac-toolbar {
    gap: 6px;
  }

  /* Hide heavy actions on small screens */
  #export_btn,
  #pdf_btn,
  #print_btn {
    display: none !important;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .mac-window {
    margin-bottom: 80px;
    border-radius: 10px;
    min-height: calc(100vh - 105px);
  }

  .mac-panel-topbar {
    padding: 14px 12px;
    min-height: 64px;
  }

  .mac-panel-meta {
    gap: 8px;
  }

  .year-badge {
    font-size: 12px;
    line-height: 1.1;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .mac-toolbar {
    padding: 8px 12px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .mac-search {
    flex: 1 1 auto;
    min-width: 0;
    order: 0;
  }

  .btn-pill {
    padding: 8px 10px;
    font-size: 13px;
  }

  .mac-search input {
    font-size: 14px;
    height: auto;
    width: 100%;
  }

  .mac-card-table {
    overflow-x: auto;
  }

  .mac-table {
    min-width: 600px;
  }

  .mac-card-footer {
    padding: 8px 10px;
  }

  .mac-pagination-custom {
    gap: 6px;
  }

  .mac-pagination-custom .page-dot {
    min-width: 22px;
    font-size: 13px;
    padding: 2px 10px;
  }

  .mac-panel-content {
    padding-bottom: 0px;
  }

  .mac-breadcrumb-custom svg {
    vertical-align: middle;
  }

  .mac-pagination-custom .page-nav svg {
    vertical-align: middle;
  }

  .mac-card-table {
    padding-bottom: 0px;
  }
}

.mac-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  transition: all 0.2s;
  margin: 0 4px;
}

.mac-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

/* Luxe Loader Overlay - Premium & Minimalist */
.mac-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease-out, visibility 0.2s;
  pointer-events: none;
}

.mac-loader-overlay:not(.hidden) {
  pointer-events: all;
}

.mac-loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Custom Animated Loader - User Provided Style */
.mac-custom-loader {
  --s: 20px;
  /* Reduced for a more subtle feel */
  --g: 3px;

  height: calc(2*(var(--s) + var(--g)));
  aspect-ratio: 1;
  background:
    radial-gradient(calc(var(--s)/sqrt(2)) at calc(50% - .1*var(--s)) calc(50% - .2*var(--s)), #0000 5%, 60%, #111 98%),
    linear-gradient(#10a561 0 0) no-repeat #fff;
  background-size: 50% 50%;
  mask: radial-gradient(calc(var(--s)/2), #000 calc(100% - 1px), #0000) 0 0/50% 50%;
  animation: l12 steps(3) 1.5s infinite;
}

@keyframes l12 {

  0%,
  12.5% {
    background-position: 0 0
  }

  12.6%,
  37.5% {
    background-position: 0 0, 100% 0
  }

  37.6%,
  62.5% {
    background-position: 0 0, 100% 100%
  }

  62.6%,
  87.5% {
    background-position: 0 0, 0 100%
  }

  87.6%,
  100% {
    background-position: 0 0
  }
}

.mac-luxe-loader {
  padding: 12px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.luxe-svg {
  width: 28px;
  height: 28px;
  animation: luxe-rotate 1.5s linear infinite;
}

.luxe-svg circle {
  fill: none;
  stroke: #10a561;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 60, 200;
  stroke-dashoffset: 0;
  animation: luxe-dash 1.5s ease-in-out infinite;
}

@keyframes luxe-rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes luxe-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 80, 200;
    stroke-dashoffset: -35px;
  }

  100% {
    stroke-dasharray: 80, 200;
  }
}

/* --- MAC FILE UPLOAD STYLES --- */
.hidden-upload {
  display: none !important;
}

.mac-file-upload .upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: #fcfcfc;
  border: 2px dashed #dbdbdb;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  text-align: center;
}

.mac-file-upload .upload-area:hover {
  background: #f8f8fb;
  border-color: #007aff;
}

.mac-file-upload .upload-icon {
  margin-bottom: 12px;
  opacity: 0.8;
}

.mac-file-upload .upload-text {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.mac-file-upload .upload-text strong {
  color: #007aff;
  font-weight: 700;
}

.mac-file-upload .upload-text p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #888;
}

.mac-file-upload .file-name {
  margin-top: 15px;
  font-size: 13px;
  font-weight: 700;
  color: #10a561;
  background: rgba(16, 165, 97, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  display: none;
}

.mac-file-upload .file-name.active {
  display: inline-block;
}

.pagination>li>a,
.pagination>li>span {
  position: relative;
  float: left;
  padding: 0px 0px;
  margin-left: -1px;
  line-height: 1.42857143;
  color: #000000 !important;
  text-decoration: none;
  background-color: #fff;
  border: none;
}

.pagination>.active>a,
.pagination>.active>a:focus,
.pagination>.active>a:hover,
.pagination>.active>span,
.pagination>.active>span:focus,
.pagination>.active>span:hover {
  z-index: 3;
  color: red;
  cursor: default;
  background-color: transparent;
  border-color: transparent;
}

.pagination {
  display: inline-block;
  padding-left: 0;
  margin: 0px 0;
  border-radius: 4px;
}