/*
 * EAPPI visual refresh, loaded after every other stylesheet.
 * Purely visual: colours, borders, corners, shadows, spacing inside elements,
 * hover and focus states. It moves, adds, hides and renames nothing; the
 * brand orange stays #f47c0e and the font stays as it is.
 */
:root {
  --eappi-orange: #f47c0e;
  --eappi-orange-dark: #d96a06;
  --eappi-orange-soft: #fff4ea;
  --eappi-orange-line: #fbd3ad;
  --eappi-ink: #1f2933;
  --eappi-text: #374151;
  --eappi-muted: #6b7280;
  --eappi-line: #e5e7eb;
  --eappi-line-strong: #d1d5db;
  --eappi-head: #f3f4f6;
  --eappi-page: #f4f5f7;
  --eappi-focus: 0 0 0 3px rgba(244, 124, 14, 0.25);
  --eappi-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.10);
  --eappi-shadow-lg: 0 4px 14px rgba(16, 24, 40, 0.08);
  --eappi-radius: 10px;
}

/* ---------- Page frame ---------- */
#content-wrapper, #content-wrapper #content { background-color: var(--eappi-page); }
#content { color: var(--eappi-text); }
#content h1.h3, #content .h3.text-gray-800 { color: var(--eappi-ink); font-weight: 600; letter-spacing: -0.01em; }
a { transition: color .15s; }

/* top bar: hairline instead of the blurry shadow */
/* one clean bottom edge: a single 1px border and a soft shadow (was an inset hairline on top of a
   transparent border, which looked like a doubled line) */
.topbar.shadow { border-bottom: 1px solid var(--eappi-line) !important; box-shadow: 0 1px 4px rgba(16, 24, 40, 0.05) !important; }

/* "Today / Last Login / Date", now in the top bar left of the user name */
.topbar.mb-4 { margin-bottom: .5rem !important; } /* the line no longer sits in this gap */
/* page titles: a little less space below them on every page (title text, size and colour unchanged) */
#content > .container-fluid > .d-sm-flex.mb-4:has(> h1) { margin-bottom: 1rem !important; }
.topbar .topbar-last-login span {
  color: var(--eappi-muted);
  font-size: 12px;
  white-space: nowrap;
  padding-right: 14px;
  margin-right: 2px;
  border-right: 1px solid var(--eappi-line);
  line-height: 1.6;
}

/* sidebar: clearer hover and active item (no size changes) */
#accordionSidebar { box-shadow: inset -1px 0 0 var(--eappi-line); }
#accordionSidebar .nav-item > .nav-link { transition: background-color .15s, color .15s, box-shadow .15s; }
#accordionSidebar .nav-item > .nav-link:hover { background-color: #f9fafb; }
#accordionSidebar .nav-item.active > .nav-link {
  background-color: var(--eappi-orange-soft);
  box-shadow: inset 4px 0 0 var(--eappi-orange);
}
#accordionSidebar hr.sidebar-divider { border-top-color: var(--eappi-line); }
.sidebar .collapse-inner { border-radius: 8px !important; box-shadow: var(--eappi-shadow-lg); border: 1px solid var(--eappi-line); }
.sidebar .collapse-inner .collapse-item { border-radius: 6px; transition: background-color .15s, color .15s; }
.sidebar .collapse-inner .collapse-item:hover { background-color: var(--eappi-orange-soft); color: var(--eappi-orange-dark); }

/* ---------- Buttons ---------- */
.btn {
  border-radius: 8px;
  font-weight: 600;
  background-image: none;
  text-shadow: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn-xs, .btn-sm, .btn-mini { border-radius: 6px; }
.btn:hover { box-shadow: 0 2px 6px rgba(16, 24, 40, 0.14); }
.btn:focus, .btn.focus, .btn:active:focus { outline: none; box-shadow: var(--eappi-focus); }
.btn:active, .btn.active { box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.14); transform: translateY(1px); }

.btn-eappi {
  background-color: var(--eappi-orange);
  border-color: var(--eappi-orange);
  color: #fff;
}
.btn-eappi:hover, .btn-eappi:focus, .btn-eappi.focus, .btn-eappi:active, .btn-eappi.active {
  background-color: var(--eappi-orange-dark);
  border-color: var(--eappi-orange-dark);
  color: #fff;
}

.btn-default { background-color: #fff; border-color: var(--eappi-line-strong); color: var(--eappi-ink); }
.btn-default:hover, .btn-default:focus, .btn-default.focus {
  background-color: #fff;
  border-color: var(--eappi-orange);
  color: var(--eappi-orange-dark);
}
.btn-default:active, .btn-default.active { background-color: var(--eappi-orange-soft); border-color: var(--eappi-orange); }

.btn-danger { background-color: #dc4c46; border-color: #dc4c46; color: #fff; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background-color: #c0392b; border-color: #c0392b; color: #fff; }
.btn-danger:focus { box-shadow: 0 0 0 3px rgba(220, 76, 70, 0.25); }

.btn-primary { background-color: #2f6fae; border-color: #2f6fae; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: #25598c; border-color: #25598c; }
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(47, 111, 174, 0.25); }

.btn-success { background-color: #2f9e57; border-color: #2f9e57; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background-color: #257f46; border-color: #257f46; }

.btn-info { background-color: #2b8bb5; border-color: #2b8bb5; }
.btn-info:hover, .btn-info:focus, .btn-info:active { background-color: #22708f; border-color: #22708f; }

/* ---------- Form inputs ---------- */
.form-control {
  border-color: var(--eappi-line-strong);
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
  color: var(--eappi-ink);
  background-color: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:hover:not([disabled]):not([readonly]) { border-color: #b8bec7; }
.form-control:focus { border-color: var(--eappi-orange); box-shadow: var(--eappi-focus); outline: none; }
.form-control::placeholder { color: #9ca3af; }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { background-color: #f3f4f6; color: var(--eappi-muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--eappi-orange); }

/* Select2 (v3) boxes, matched to the inputs */
.select2-container .select2-choice,
.select2-container-multi .select2-choices {
  border-color: var(--eappi-line-strong);
  border-radius: 8px;
  background-image: none;
  background-color: #fff;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
}
.select2-container .select2-choice .select2-arrow { background: transparent; border-left: none; }
.select2-container-active .select2-choice, .select2-container-active .select2-choices,
.select2-dropdown-open .select2-choice { border-color: var(--eappi-orange); box-shadow: var(--eappi-focus); }
.select2-drop { border-radius: 0 0 8px 8px; box-shadow: var(--eappi-shadow-lg); }
.select2-drop-active { border-color: var(--eappi-orange); }
.select2-results .select2-highlighted { background: var(--eappi-orange); }
.select2-container-multi .select2-choices .select2-search-choice {
  background-image: none; background-color: var(--eappi-orange-soft);
  border-color: var(--eappi-orange-line); border-radius: 999px; box-shadow: none; color: var(--eappi-ink);
}

/* ---------- Tables ---------- */
.table { color: var(--eappi-text); background-color: #fff; }
/* one consistent card: a real 1px border on all four sides and no shadow (a shadow or outline drawn
   outside the table was clipped by the .table-responsive scroll containers, so sides looked uneven) */
.table-bordered { border: 1px solid var(--eappi-line) !important; border-radius: var(--eappi-radius); border-collapse: separate !important; border-spacing: 0; overflow: hidden; box-shadow: none; }
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
  border-color: var(--eappi-line);
  border-width: 0 0 1px 1px;
}
.table-bordered > * > tr > :first-child { border-left-width: 0; }
.table-bordered > * > tr:last-child > td, .table-bordered > * > tr:last-child > th { border-bottom-width: 0; }
.table > thead > tr > th, .table > tbody > tr > th, .table > tbody > tr > td { padding-top: 10px; padding-bottom: 10px; }

/* header cells (many tables have no <thead>); the orange .message_head titles keep their colour */
.table > thead > tr > th:not(.message_head),
.table > tbody > tr > th:not(.message_head) {
  background-color: var(--eappi-head);
  color: var(--eappi-ink);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--eappi-line-strong);
}
.table th.message_head { letter-spacing: .01em; }
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #fafafb; }
.table-hover > tbody > tr { transition: background-color .12s, box-shadow .12s; }
.table-hover > tbody > tr:hover { background-color: var(--eappi-orange-soft); }
.incidentsTableRow:hover > td:first-child, .logsTableRow:hover > td:first-child { box-shadow: inset 3px 0 0 var(--eappi-orange); }
.table > tbody > tr > td a { text-decoration: none; }
.table-responsive { border: 0; }
/* Chrome does not clip cell backgrounds to the table's rounded corners, so a coloured corner
   cell (orange title, grey header) stayed square: round the four corner cells themselves */
.table-bordered > :first-child > tr:first-child > :first-child,
.table-bordered > thead > tr:first-child > :first-child { border-top-left-radius: 9px; }
/* a lone title cell that does not span the row (e.g. "General Info") keeps its square right edge */
.table-bordered > :first-child > tr:first-child > :last-child:not(:first-child),
.table-bordered > :first-child > tr:first-child > :only-child[colspan],
.table-bordered > thead > tr:first-child > :last-child:not(:first-child),
.table-bordered > thead > tr:first-child > :only-child[colspan] { border-top-right-radius: 9px; }
.table-bordered > :last-child > tr:last-child > :first-child { border-bottom-left-radius: 9px; }
.table-bordered > :last-child > tr:last-child > :last-child { border-bottom-right-radius: 9px; }

/* DataTables (where used) */
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--eappi-line-strong); border-radius: 8px; padding: 4px 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: 6px !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--eappi-orange) !important; border-color: var(--eappi-orange) !important; color: #fff !important;
}

/* ---------- Pagination ---------- */
.pagination > li > a, .pagination > li > span {
  color: var(--eappi-text);
  background-color: #fff;
  border-color: var(--eappi-line);
  font-weight: 600;
  transition: background-color .15s, color .15s;
}
.pagination > li > a:hover, .pagination > li > span:hover { background-color: var(--eappi-orange-soft); color: var(--eappi-orange-dark); border-color: var(--eappi-line); }
.pagination > li:first-child > a, .pagination > li:first-child > span { border-radius: 8px 0 0 8px; }
.pagination > li:last-child > a, .pagination > li:last-child > span { border-radius: 0 8px 8px 0; }
.pagination > .active > a, .pagination > .active > span,
.pagination > .active > a:hover, .pagination > .active > span:hover {
  background-color: var(--eappi-orange); border-color: var(--eappi-orange); color: #fff;
}

/* ---------- Cards, panels, tabs ---------- */
.card { border: 1px solid var(--eappi-line); border-radius: 12px; box-shadow: var(--eappi-shadow) !important; overflow: hidden; }
.card > .card-header { background-color: #fff; border-bottom-color: var(--eappi-line); }
.card > .card-header h6, .card > .card-header .m-0 { color: var(--eappi-ink); }
.card.border-left-primary { border-left: 4px solid var(--eappi-orange) !important; }
/* dashboard count circles: their inline 15px side padding left room for only 3 digits;
   drop the side padding so 4-5 digit counts stay on one line (size and position unchanged) */
.card .col-auto > div[style*="border-radius: 50%"] { padding-left: 0 !important; padding-right: 0 !important; white-space: nowrap; }
.card .list-group-item { border-color: var(--eappi-line); transition: background-color .12s; }
.card .list-group-item:hover { background-color: var(--eappi-orange-soft); }
.panel { border-color: var(--eappi-line); border-radius: var(--eappi-radius); box-shadow: var(--eappi-shadow); }
.panel > .panel-heading { border-top-left-radius: 9px; border-top-right-radius: 9px; }

/* ---------- Tab menus of the incident (vertical) and log (horizontal) forms ----------
   Same tabs, sizes and positions; the active tab keeps its orange and its arrow. */
.adding-incident-details-tab > .nav-tabs,
.adding-log-details-tab > .nav-tabs {
  background-color: #fff !important;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--eappi-line), var(--eappi-shadow);
}
.adding-incident-details-tab > .nav-tabs > li,
.adding-log-details-tab > .nav-tabs > li { transition: background-color .15s; }
.adding-incident-details-tab > .nav-tabs > li:not(.active),
.adding-log-details-tab > .nav-tabs > li:not(.active) { background: transparent !important; }
.adding-incident-details-tab > .nav-tabs > li:not(.active) > a,
.adding-log-details-tab > .nav-tabs > li:not(.active) > a {
  background: transparent !important;
  color: var(--eappi-text) !important;
  font-weight: 600;
  transition: color .15s;
}
.adding-incident-details-tab > .nav-tabs > li:not(.active):hover,
.adding-log-details-tab > .nav-tabs > li:not(.active):hover { background: var(--eappi-orange-soft) !important; }
.adding-incident-details-tab > .nav-tabs > li:not(.active):hover > a,
.adding-log-details-tab > .nav-tabs > li:not(.active):hover > a { color: var(--eappi-orange-dark) !important; }
.adding-incident-details-tab > .nav-tabs > li.active > a,
.adding-log-details-tab > .nav-tabs > li.active > a { font-weight: 700; }
/* vertical menu: solid hairlines instead of dashes (same 1px), rounded ends */
.adding-incident-details-tab > .nav-tabs > li { border-bottom: 1px solid var(--eappi-line) !important; }
.adding-incident-details-tab > .nav-tabs > li:first-child { border-radius: 10px 10px 0 0; }
.adding-incident-details-tab > .nav-tabs > li:last-child { border-bottom-color: transparent !important; border-radius: 0 0 10px 10px; }
/* horizontal menu: thin dividers between tabs, no dashed underline, rounded ends */
.adding-log-details-tab > .nav-tabs > li { border-bottom-color: transparent !important; }
.adding-log-details-tab > .nav-tabs > li:not(:last-child):not(.active) { box-shadow: inset -1px 0 0 var(--eappi-line); }
.adding-log-details-tab > .nav-tabs > li:first-child { border-radius: 10px 0 0 10px; }
.adding-log-details-tab > .nav-tabs > li:last-child { border-radius: 0 10px 10px 0; }

/* ---------- Labels, badges, alerts, dialogs, menus ---------- */
.label { border-radius: 999px; font-weight: 600; padding: .25em .7em .3em; }
.label-danger { background-color: #dc4c46; }
.label-success { background-color: #2f9e57; }
.badge { border-radius: 999px; }
.alert { border-radius: 8px; }
.modal-content { border-radius: 12px; border-color: var(--eappi-line); box-shadow: 0 12px 32px rgba(16, 24, 40, 0.2); overflow: hidden; }
.modal-header { border-bottom-color: var(--eappi-line); }
.modal-footer { border-top-color: var(--eappi-line); }
.dropdown-menu { border-radius: 10px; border-color: var(--eappi-line); box-shadow: var(--eappi-shadow-lg); }
.dropdown-menu > li > a:hover, .dropdown-item:hover { background-color: var(--eappi-orange-soft); }

/* ---------- Login page ---------- */
.login-table { border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.15); }
.login-table .form-control:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45); border-color: #fff; }

/* ---------- Date / time picker (jQuery UI) ----------
   Same widget, size, position and behaviour; only its look changes. */
.ui-datepicker.ui-widget-content {
  background: #fff;
  border: 1px solid var(--eappi-line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.16);
  color: var(--eappi-ink);
}
.ui-datepicker .ui-datepicker-header {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--eappi-line);
  border-radius: 0;
  color: var(--eappi-ink);
}
.ui-datepicker .ui-datepicker-title { font-weight: 700; }
/* prev / next: simple orange chevrons, no glossy buttons, no jump on hover */
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next {
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  top: 2px;
}
.ui-datepicker .ui-datepicker-prev { left: 2px; }
.ui-datepicker .ui-datepicker-next { right: 2px; }
.ui-datepicker .ui-datepicker-prev.ui-state-hover, .ui-datepicker .ui-datepicker-next.ui-state-hover { background: var(--eappi-orange-soft); border: 0; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { background: none; text-indent: 0; font-size: 0; }
.ui-datepicker .ui-datepicker-prev span::before, .ui-datepicker .ui-datepicker-next span::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 4px 0 0 5px;
  border-left: 2px solid var(--eappi-orange);
  border-bottom: 2px solid var(--eappi-orange);
  transform: rotate(45deg);
}
.ui-datepicker .ui-datepicker-next span::before { margin-left: 2px; transform: rotate(-135deg); }
.ui-datepicker .ui-datepicker-prev.ui-state-disabled span::before, .ui-datepicker .ui-datepicker-next.ui-state-disabled span::before { border-color: var(--eappi-line-strong); }
/* week-day names and day cells: no boxes; today outlined, selected day filled orange */
.ui-datepicker th { color: var(--eappi-muted); font-weight: 600; }
.ui-datepicker td .ui-state-default {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--eappi-ink);
  font-weight: 400;
  text-align: center;
  transition: background-color .12s, color .12s;
}
.ui-datepicker td .ui-state-default.ui-state-hover, .ui-datepicker td a.ui-state-default:hover {
  background: var(--eappi-orange-soft);
  border-color: transparent;
  color: var(--eappi-orange-dark);
}
.ui-datepicker td .ui-state-default.ui-state-highlight {
  background: transparent;
  border-color: var(--eappi-orange);
  color: var(--eappi-orange-dark);
  font-weight: 700;
}
.ui-datepicker td .ui-state-default.ui-state-active,
.ui-datepicker td .ui-state-default.ui-state-active.ui-state-hover {
  background: var(--eappi-orange);
  border-color: var(--eappi-orange);
  color: #fff;
  font-weight: 700;
}
.ui-datepicker td.ui-datepicker-other-month .ui-state-default { color: #9ca3af; }
.ui-datepicker td.ui-state-disabled .ui-state-default { opacity: .45; }
/* time sliders and the Now / Done buttons */
.ui-datepicker .ui-timepicker-div dl dt, .ui-datepicker .ui-timepicker-div dl dd { color: var(--eappi-text); }
.ui-datepicker .ui-slider.ui-widget-content { background: #eef0f3; border: 0; border-radius: 999px; }
.ui-datepicker .ui-slider .ui-slider-handle.ui-state-default {
  background: #fff;
  border: 2px solid var(--eappi-orange);
  border-radius: 50%;
  cursor: grab;
}
.ui-datepicker .ui-datepicker-buttonpane { border-top: 1px solid var(--eappi-line); background: none; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-state-default {
  background: #fff;
  border: 1px solid var(--eappi-line-strong);
  border-radius: 6px;
  color: var(--eappi-ink);
  font-weight: 600;
  opacity: 1;
}
.ui-datepicker .ui-datepicker-buttonpane button.ui-state-default.ui-state-hover { border-color: var(--eappi-orange); color: var(--eappi-orange-dark); }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-close { background: var(--eappi-orange); border-color: var(--eappi-orange); color: #fff; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-close.ui-state-hover { background: var(--eappi-orange-dark); border-color: var(--eappi-orange-dark); color: #fff; }

/* ---------- List pages: "Add New" on the left, as on Incidents and Logs (Daniel's request) ---------- */
.content .lookup_content > .btn-eappi[data-target="#myModal"],
.content .roles > .btn-eappi[data-target="#myModal"],
.content .users > .btn-eappi[data-target="#myModal"] {
  display: block;
  float: none !important;
  margin-left: 0;
  margin-right: auto;
}

/* ---------- System Lookups ---------- */
/* Name filter on the left, aligned with the page content */
.content .lookup-filter { text-align: left; margin: 0 0 4px 0; }
.content .lookup-filter form { margin-left: 0; }
/* lookup selectors: calm chips of equal height; orange only on hover and for the active one */
.content .lookups .nav-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.content .lookups .nav-pills > li.borders {
  float: none;
  margin: 0 !important;
  padding: 0;
  border: 1px solid var(--eappi-line-strong);
  border-radius: 999px;
  background: #fff !important;
  transition: background-color .15s, border-color .15s;
}
.content .lookups .nav-pills > li.borders > a {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--eappi-text) !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.content .lookups .nav-pills > li.borders:hover { border-color: var(--eappi-orange); background: var(--eappi-orange-soft) !important; }
.content .lookups .nav-pills > li.borders:hover > a { color: var(--eappi-orange-dark) !important; }
.content .lookups .nav-pills > li.borders.active { border-color: var(--eappi-orange); background: var(--eappi-orange) !important; }
.content .lookups .nav-pills > li.borders.active > a { color: #fff !important; }

/* ---------- ID columns: smaller, muted, tabular figures so they line up and step back ----------
   #all-incidents (Incidents, Login Logs), #all-logs (Logs) and #example (report pages, Settings
   emails, DataTables) all have the ID in their first column. */
#all-incidents > tbody > tr > td:first-child,
#all-logs > tbody > tr > td:first-child,
#example > tbody > tr > td:first-child {
  color: var(--eappi-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
#all-incidents > tbody > tr > td:first-child a,
#all-logs > tbody > tr > td:first-child a,
#example > tbody > tr > td:first-child a { color: var(--eappi-muted); transition: color .15s; }
#all-incidents > tbody > tr > td:first-child a:hover,
#all-logs > tbody > tr > td:first-child a:hover,
#example > tbody > tr > td:first-child a:hover,
#all-incidents > tbody > tr:hover > td:first-child a,
#all-logs > tbody > tr:hover > td:first-child a { color: var(--eappi-orange-dark); }

/* ---------- Dashboard "Latest Incidents" / "Latest Logs" ----------
   Each row reads as one item: the text, then its date as a small muted line under it.
   Not Approved records get a red badge on the second line (index.php). */
.card-body > .force-overflow > ul.scrollbar { padding: 0 0 10px; margin-bottom: 0; }
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px !important;
  font-size: 14px !important;
  border-bottom: 1px solid var(--eappi-line) !important;
  transition: background-color .12s;
}
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover:hover { background: var(--eappi-orange-soft) !important; }
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover p { margin: 0; line-height: 1.45; }
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover p > span:first-child { font-variant-numeric: tabular-nums; }
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover > .notification-date-time {
  float: none !important;
  text-align: left;
  padding-right: 0;
  font-size: 12px;
  color: var(--eappi-muted);
  font-variant-numeric: tabular-nums;
}
/* thin, light scrollbar instead of the dark bar */
#style-1::-webkit-scrollbar { width: 8px; background-color: transparent; }
#style-1::-webkit-scrollbar-track { -webkit-box-shadow: none; background-color: transparent; }
#style-1::-webkit-scrollbar-thumb { -webkit-box-shadow: none; background-color: #d1d5db; border-radius: 999px; border: 2px solid #fff; }
#style-1::-webkit-scrollbar-thumb:hover { background-color: #b8bec7; }

/* ---------- Pager (every list) + "Go to page": one consistent set ----------
   Same 14px semibold text and colour for numbers, First/Prev/Next/Last, the "Go to page … of N"
   text and the Go button; page buttons, input and Go button all 36px high on one line. */
.content div.pagination { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 0; }
.content div.pagination .eappi-pager { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.content div.pagination .eappi-pager a,
.content div.pagination .eappi-pager .current,
.content div.pagination .eappi-pager .gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--eappi-text);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.content div.pagination .eappi-pager a { transition: background-color .15s, color .15s; }
.content div.pagination .eappi-pager a:hover { background: var(--eappi-orange-soft); color: var(--eappi-orange-dark); }
.content div.pagination .eappi-pager .current { background: var(--eappi-orange); border-color: var(--eappi-orange); color: #fff; }
.content div.pagination .eappi-pager .gap { min-width: 0; padding: 0 2px; color: var(--eappi-muted); }
.content div.pagination .eappi-pager-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0 12px;
  padding-left: 16px;
  border-left: 1px solid var(--eappi-line-strong);
  height: 36px;
  font-size: 14px;
  font-weight: 600;
  color: var(--eappi-text);
}
.content div.pagination .eappi-pager-jump label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--eappi-text); }
.content div.pagination .eappi-pager-jump input.form-control {
  display: inline-block;
  box-sizing: border-box;
  width: 92px;
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--eappi-text);
}
.content div.pagination .eappi-pager-jump .btn {
  height: 36px;
  min-width: 48px;
  padding: 0 14px;
  margin-bottom: 0 !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

/* ---------- Filter bars (All Logs, All Incidents, Users, File Manager): one compact, left-aligned,
   wrapping row that lines up with the table below. Same fields, names, order and submission;
   only the layout changes. Controls size to their text (field-sizing) so nothing is cut off. */
.content .logs-filter > .row > form,
.content .incidents-filter > .row > form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto; /* the parent .row is a flex container */
  margin: 0 0 4px;
}
/* the filter containers take the table's box (95% of .content, centred), so both edges line up */
.content > .logs-filter, .content > .incidents-filter, .content > .users-filter, .content > .file-manager-filter {
  width: 95% !important; max-width: none; margin-left: auto !important; margin-right: auto !important; padding-left: 0; padding-right: 0;
}
.content > .logs-filter > .row, .content > .incidents-filter > .row { margin-left: 0; margin-right: 0; }
.content .logs-filter > .row > form > div,
.content .incidents-filter > .row > form > div,
.content .logs-filter > .row > form > div > .inline-block-displaying,
.content .incidents-filter > .row > form > div > .inline-block-displaying { display: contents; }
.content .logs-filter > .row > form .form-control,
.content .incidents-filter > .row > form .form-control,
.content .users-filter .form-control,
.content .file-manager-filter .form-control {
  flex: 0 0 auto;
  field-sizing: content;
  min-width: 120px;
  max-width: 300px;
  width: auto !important;
  float: none !important;
  margin: 0;
}
.content .logs-filter > .row > form .filterDate,
.content .incidents-filter > .row > form .filterDate { min-width: 130px; }
.content .logs-filter > .row > form .btn,
.content .incidents-filter > .row > form .btn,
.content .users-filter .btn,
.content .file-manager-filter .btn { flex: 0 0 auto; margin-bottom: 0 !important; float: none !important; }
.content .logs-filter > .row > form input[type="submit"],
.content .incidents-filter > .row > form input[type="submit"] { margin-left: 4px; }

/* Users: label above each field as before, but left-aligned in one row */
.content .users-filter { text-align: left; margin-top: 20px; }
.content .users-filter > form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.content .users-filter > form > .form-group { margin: 0; }
.content .users-filter > form > .form-group > label { display: block; margin-bottom: 4px; }

/* File Manager: its two forms (file name + ID, and type) side by side, each keeping its own Filter */
.content .file-manager-filter { display: flex !important; flex-wrap: wrap; align-items: flex-end; gap: 8px 24px; margin-bottom: 14px; }
.content .file-manager-filter > form,
.content .file-manager-filter > .form-group > form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; width: auto !important; margin: 0; }
.content .file-manager-filter > .form-group,
.content .file-manager-filter > form > .form-group,
.content .file-manager-filter > form > .form { margin: 0; }
.content .file-manager-filter > .form-group > form > label { flex: 0 0 100%; margin: 0 0 4px; }
.content .file-manager-filter label { display: block; margin-bottom: 4px; }

/* ---------- Empty states ("No Violations !", "No Records !", ...): all use Bootstrap 3 .well ----------
   Flat, light and quiet instead of the grey gradient box; same padding and position, same text. */
.well {
  background: #fbfbfc;
  background-image: none;
  border: 1px dashed var(--eappi-line-strong);
  border-radius: 10px;
  box-shadow: none;
  color: var(--eappi-muted);
}
.well::before {
  content: "\f05a"; /* Font Awesome: info-circle */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 8px;
  color: #b8bec7;
}

/* ---------- Status badges (pills): Approved green, Not Approved red, anything else grey ---------- */
.eappi-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  vertical-align: middle;
  background: #eef0f3;
  color: #4b5563;
}
.eappi-badge-success { background: #e6f4ea; color: #1e6b35; }
.eappi-badge-danger { background: #fdecec; color: #a12622; }
.notification-date-time .eappi-badge { margin-left: 6px; }

/* ---------- All Incidents list: column widths, alignment, quieter secondary columns ----------
   (#all-incidents is also used by Login Logs; :has() limits this to the 11-column incidents list)
   1 ID | 2 User | 3 Title | 4 Status | 5 Incident Date | 6 Region | 7 Governorate | 8 Community |
   9 Checkpoint | 10 Perpetrator | 11 Sent To */
/* short fields: fit their content on one line */
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(1),
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(4),
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(5),
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(7),
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(9) { width: 1%; white-space: nowrap; }
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > td:nth-child(5) { font-variant-numeric: tabular-nums; }
/* the title matters most: widest column, wraps gracefully */
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(3) { min-width: 150px; width: 40%; }
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > td:nth-child(3) a { color: var(--eappi-ink); font-weight: 600; }
/* medium text: moderate width, avoid one-word-per-line stacks */
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(2),
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(8),
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(10) { min-width: 100px; }
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(10) { min-width: 135px; width: 9%; }
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(6) { width: 7%; max-width: 130px; }
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(2),
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(8) { width: 8%; max-width: 180px; }
/* secondary columns: quieter */
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > td:nth-child(n+6) a,
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > td:nth-child(n+6) { color: var(--eappi-muted); }
/* "Sent To": a list of addresses without spaces; let it break anywhere, smaller */
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(11) { min-width: 110px; width: 13%; max-width: 260px; }
#all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > td:nth-child(11) { font-size: 12.5px; overflow-wrap: anywhere; }
.content .file-manager-filter > .file-manager-zip { margin-left: auto; }
.content .file-manager-filter > .form-group > form { row-gap: 0; }

/* ---------- Dashboard grid: the four boxes share one grid ----------
   The row gap was 20px (inline on the counter row) against a 30px column gutter, and the inner text
   started at slightly different offsets in each box; now 30px both ways and one inner edge. */
#content .container-fluid > .row:has(> div > .card.border-left-primary) { margin-bottom: 30px !important; }
#content .card > .card-header:has(> h5) { padding-left: 18px; padding-right: 18px; }
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover { padding-left: 18px !important; padding-right: 18px !important; }
/* Bootstrap's clearfix ::before/::after became invisible flex items, so the 8px gap pushed the first chip right */
.content .lookups .nav-pills::before, .content .lookups .nav-pills::after { content: none; display: none; }
/* chips start at the same left edge as the Name filter and the table below */
.content > .lookups > .col-md-12 { padding-left: 0 !important; padding-right: 0 !important; }

/* ---------- All Logs list: same treatment as All Incidents ----------
   1 ID | 2 User | 3 Title | 4 Type | 5 Report Date | 6 Region | 7 Governorate | 8 Community | 9 Checkpoint | 10 Location */
#all-logs > tbody > tr > :nth-child(1),
#all-logs > tbody > tr > :nth-child(5),
#all-logs > tbody > tr > :nth-child(7),
#all-logs > tbody > tr > :nth-child(9) { width: 1%; white-space: nowrap; }
#all-logs > tbody > tr > td:nth-child(5) { font-variant-numeric: tabular-nums; }
#all-logs > tbody > tr > :nth-child(3) { min-width: 200px; width: 34%; }
#all-logs > tbody > tr > td:nth-child(3) a { color: var(--eappi-ink); font-weight: 600; }
#all-logs > tbody > tr > :nth-child(2),
#all-logs > tbody > tr > :nth-child(4),
#all-logs > tbody > tr > :nth-child(8) { min-width: 110px; width: 9%; max-width: 190px; }
#all-logs > tbody > tr > :nth-child(6) { width: 7%; max-width: 130px; }
#all-logs > tbody > tr > :nth-child(10) { min-width: 130px; width: 12%; }
#all-logs > tbody > tr > td:nth-child(n+6) a,
#all-logs > tbody > tr > td:nth-child(n+6) { color: var(--eappi-muted); }

/* ---------- Other lists: short columns stay on one line ---------- */
.content .users > table.custom-table > tbody > tr > :last-child,
.content .lookup_content > table > tbody > tr > :last-child { white-space: nowrap; width: 1%; }
/* System Lookups: chips, Name filter, "Add New" and table start under the page title */
.content:has(> .lookups) { padding-left: 15px; padding-right: 15px; }

/* ---------- One table style for every list and form table ----------
   Same font size, padding and light header everywhere; text, IDs and dates left-aligned (the old
   .custom-table centred every cell); status badges and icon/action columns centred; cells marked
   .center-text-align (the orange section titles) keep their centring. */
#content .table { font-size: 14px; }
#content .table > thead > tr > *,
#content .table > tbody > tr > * { padding: 10px 8px; vertical-align: top; }
#content .table > thead > tr > th:not(.message_head),
#content .table > tbody > tr > th:not(.message_head) { font-size: 14px; font-weight: 700; white-space: nowrap; }
#content .table > thead > tr > *:not(.center-text-align),
#content .table > tbody > tr > *:not(.center-text-align) { text-align: left !important; }
/* Login Logs coloured its header cells orange inline: same light header as the other lists */
#content .table > tbody > tr > th[style*="#f47c0e"] { background-color: var(--eappi-head) !important; color: var(--eappi-ink); }
/* centred: status badges (All Incidents), status icons and action buttons (Users, Lookups), Roles' permission icons */
#content #all-incidents:has(> tbody > tr > th:nth-child(11)) > tbody > tr > :nth-child(4),
#content .content .users > table.custom-table > tbody > tr > :nth-child(5),
#content .content .users > table.custom-table > tbody > tr > :last-child,
#content .content .lookup_content > table > tbody > tr > :nth-last-child(2),
#content .content .lookup_content > table > tbody > tr > :last-child,
#content .content .roles > table.custom-table > tbody > tr > :not(:first-child) { text-align: center !important; }
/* File Manager puts its pager in a table cell: keep it centred like the other pagers */
#content .table > tbody > tr > td:has(> div.pagination) { text-align: center !important; }

/* ---------- Follow-ups after v2026.11.05.7 ---------- */
/* sb-admin-2 gave the active sidebar icon a white box (for the old white active item); on the light
   orange active/hover background it showed as a white square */
#accordionSidebar .nav-item .nav-link i { background: transparent !important; }
/* the white PDF thumbnail (images/pdf.jpg) blends into striped and hovered table rows */
#content .table img[src$="images/pdf.jpg"] { mix-blend-mode: multiply; }
/* dashboard: below 992px the list panels stack (col-lg-6) but the counter cards stayed side by side
   (col-md-6); stack them at the same breakpoint so both rows share one grid at every width */
@media (max-width: 991.98px) {
  #content .container-fluid > .row:has(> div > .card.border-left-primary) > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  #content .container-fluid > .row:has(> div > .card.border-left-primary) > [class*="col-"] + [class*="col-"] { margin-top: 30px; }
}
/* the list panels: the same 30px spacing as the rest of the grid (was 24px + 24px when stacked) */
#content .container-fluid > .row > .col-lg-6.mb-4:has(ul.scrollbar) { margin-bottom: 30px !important; }
#content .container-fluid > .row > .col-lg-6.mb-4:has(ul.scrollbar) > .card.mb-4 { margin-bottom: 0 !important; }
/* Latest Incidents / Latest Logs: one step larger text */
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover { font-size: 15px !important; }
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover > .notification-date-time { font-size: 13px; }
.card-body > .force-overflow > ul.scrollbar > li.eappi_hover .eappi-badge { font-size: 12px; }
/* top bar right side: "Previous sign-in", divider and user name evenly spaced and centred */
.topbar .topbar-last-login span { padding-right: 16px; margin-right: 0; line-height: 20px; }
.topbar #userDropdown { display: flex; align-items: center; gap: 8px; padding-left: 16px; padding-right: 0; }
.topbar #userDropdown > span { margin-right: 0 !important; font-size: 13px; color: var(--eappi-text) !important; line-height: 20px; }
.topbar #userDropdown > i { color: #b8bec7; }
