/**
 * hochste-ui.css — Hochste Healthcare Design System
 * Modern, professional healthcare UI
 *
 * Created: 2026-04-11 | Updated: 2026-04-11 (v2 — premium UI upgrade)
 */

/* ══════════════════════════════════════════════════════════════════
   PREMIUM UI UPGRADE — Global Enhancements
   ══════════════════════════════════════════════════════════════════ */

/* ── Smooth Transitions on Everything ──────────────────────────── */
*, *::before, *::after {
  transition: background-color 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, color 0.15s ease, transform 0.15s ease;
}

/* ── Enhanced Card Styling ─────────────────────────────────────── */
.card {
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(27,79,138,0.06) !important;
  overflow: hidden;
}
.card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(27,79,138,0.10) !important;
  transform: translateY(-1px);
}
.card-header {
  background: linear-gradient(135deg, #f8fafd 0%, #eef3f9 100%) !important;
  border-bottom: 1px solid #e3eaf3 !important;
  padding: 16px 20px !important;
}
.card-header h2 {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--hc-primary, #1B4F8A) !important;
  margin: 0 !important;
  letter-spacing: -0.3px;
}
.card-body {
  padding: 20px !important;
}

/* ── Premium Buttons ───────────────────────────────────────────── */
.btn {
  font-weight: 500 !important;
  border-radius: 8px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.10);
}
.btn-primary {
  background: linear-gradient(135deg, #1B4F8A 0%, #2563a8 100%) !important;
  border: none !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #154070 0%, #1e5490 100%) !important;
}
.btn-danger {
  background: linear-gradient(135deg, #E74C3C 0%, #c0392b 100%) !important;
  border: none !important;
}
.btn-success {
  background: linear-gradient(135deg, #27AE60 0%, #219a52 100%) !important;
  border: none !important;
}
.btn-warning {
  background: linear-gradient(135deg, #F39C12 0%, #e67e22 100%) !important;
  border: none !important;
  color: #fff !important;
}
.btn-light {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
  color: #495057 !important;
}
.btn-pill {
  border-radius: 50px !important;
  padding: 8px 24px !important;
}
.btn_cust {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px !important;
  font-size: 13px !important;
}

/* ── Enhanced DataTables ───────────────────────────────────────── */
table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
table.dataTable thead th {
  background: linear-gradient(180deg, #f1f5f9 0%, #e8edf3 100%) !important;
  color: var(--hc-dark, #1C2A3A) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 12px 14px !important;
  border-bottom: 2px solid var(--hc-primary, #1B4F8A) !important;
  white-space: nowrap;
}
table.dataTable tbody td {
  padding: 11px 14px !important;
  font-size: 13px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f0f2f5 !important;
}
table.dataTable tbody tr:hover {
  background-color: #edf4fc !important;
}
table.dataTable tbody tr:nth-child(even) {
  background-color: #fafbfd;
}

/* ── Form Controls ─────────────────────────────────────────────── */
.form-control {
  border: 1.5px solid #dde4ee !important;
  border-radius: 8px !important;
  padding: 9px 14px !important;
  font-size: 13px !important;
  color: #2C3E50 !important;
  background-color: #fff !important;
}
.form-control:focus {
  border-color: var(--hc-primary, #1B4F8A) !important;
  box-shadow: 0 0 0 3px rgba(27,79,138,0.10) !important;
  outline: none !important;
}
.form-control::placeholder {
  color: #a0aec0 !important;
  font-size: 12px;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236C7A8D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px !important;
}
label {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #4a5568 !important;
  margin-bottom: 4px !important;
}

/* ── Modal flicker fix: keep scrollbar always visible so Bootstrap's
      body.modal-open padding-right compensation doesn't shift content. */
html { overflow-y: scroll; }
body.modal-open { padding-right: 0 !important; }

/* ── Enhanced Modals ───────────────────────────────────────────── */
.modal-content {
  border: none !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
  overflow: hidden;
}
.modal-header {
  background: linear-gradient(135deg, var(--hc-primary, #1B4F8A) 0%, #2563a8 100%) !important;
  color: #fff !important;
  padding: 16px 20px !important;
  border-bottom: none !important;
}
.modal-header .modal-title {
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}
.modal-header .close {
  color: #fff !important;
  opacity: 0.8 !important;
  text-shadow: none !important;
}
.modal-header .close:hover {
  opacity: 1 !important;
}
.modal-body {
  padding: 20px !important;
}
.modal-footer {
  background: #f8fafd !important;
  border-top: 1px solid #e3eaf3 !important;
  padding: 12px 20px !important;
}

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
  font-weight: 500 !important;
  padding: 5px 12px !important;
  border-radius: 50px !important;
  font-size: 11px !important;
  letter-spacing: 0.3px;
}
.badge-success {
  background: linear-gradient(135deg, #27AE60, #2ecc71) !important;
  box-shadow: 0 2px 4px rgba(39,174,96,0.25);
}
.badge-danger {
  background: linear-gradient(135deg, #E74C3C, #e85d4f) !important;
  box-shadow: 0 2px 4px rgba(231,76,60,0.25);
}
.badge-warning {
  background: linear-gradient(135deg, #F39C12, #f1c40f) !important;
  color: #fff !important;
  box-shadow: 0 2px 4px rgba(243,156,18,0.25);
}
.badge-info {
  background: linear-gradient(135deg, #3498db, #5dade2) !important;
  box-shadow: 0 2px 4px rgba(52,152,219,0.25);
}

/* ── Sidebar Enhancement ───────────────────────────────────────── */
.left-sidebar {
  background: linear-gradient(180deg, #0f2744 0%, #1a3a5c 40%, #1B4F8A 100%) !important;
  box-shadow: 4px 0 20px rgba(0,0,0,0.12) !important;
}
.left-sidebar .sidebar .nav-link {
  color: rgba(255,255,255,0.7) !important;
  border-radius: 8px !important;
  margin: 2px 10px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
}
.left-sidebar .sidebar .nav-link:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}
.left-sidebar .sidebar .nav-link.active,
.left-sidebar .sidebar .nav-link[aria-expanded="true"] {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
.left-sidebar .sidebar .nav-link i,
.left-sidebar .sidebar .nav-link .mdi {
  opacity: 0.8;
  width: 20px;
  text-align: center;
  margin-right: 10px;
}

/* ── Breadcrumb Bar Enhancement ────────────────────────────────── */
.breadcrumb-bar {
  background: linear-gradient(135deg, #f8fafd 0%, #f0f5fb 100%) !important;
  border-bottom: 1px solid #e3eaf3 !important;
  font-size: 12px !important;
}
.breadcrumb-bar a {
  font-weight: 500;
}
.breadcrumb-bar a:hover {
  text-decoration: underline !important;
}

/* ── Select2 Enhancement ───────────────────────────────────────── */
.select2-container--default .select2-selection--single {
  border: 1.5px solid #dde4ee !important;
  border-radius: 8px !important;
  height: 38px !important;
  padding: 4px 8px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px !important;
  font-size: 13px !important;
  color: #2C3E50 !important;
}
.select2-dropdown {
  border: 1.5px solid #dde4ee !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}
.select2-results__option--highlighted {
  background-color: var(--hc-primary, #1B4F8A) !important;
}

/* ── SweetAlert Enhancement ────────────────────────────────────── */
.sweet-alert {
  border-radius: 14px !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
}
.sweet-alert h2 {
  font-family: var(--hc-font, 'Inter', sans-serif) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}
.sweet-alert p {
  font-size: 14px !important;
  color: #6C7A8D !important;
}
.sweet-alert .sa-confirm-button-container .confirm {
  border-radius: 8px !important;
  font-weight: 500 !important;
  padding: 10px 28px !important;
}

/* ── Scrollbar Styling — thick & easy to grab, site-wide ───────── */
* { scrollbar-width: auto; scrollbar-color: #64748b #f1f5f9; }
::-webkit-scrollbar { width: 18px !important; height: 18px !important; }
::-webkit-scrollbar-track { background: #f1f5f9 !important; border-radius: 9px; }
::-webkit-scrollbar-thumb { background: #64748b !important; border-radius: 9px; border: 3px solid #f1f5f9; }
::-webkit-scrollbar-thumb:hover { background: #475569 !important; }
::-webkit-scrollbar-corner { background: #f1f5f9; }

/* Simplebar (sidebar custom scrollbar) — match the global thickness
   NOTE: style.css forces thumb width:5px / left:6px / right:6px on .simplebar-scrollbar::before
         so we override all three with !important and pull the thumb to the track edges. */
.simplebar-track.simplebar-vertical   { width: 16px !important; }
.simplebar-track.simplebar-horizontal { height: 16px !important; }
.simplebar-scrollbar::before,
.simplebar-scrollbar:before {
  background: #64748b !important;
  border-radius: 8px !important;
  opacity: 0.85 !important;
  width: auto !important;
  left: 2px !important;
  right: 2px !important;
  top: 2px !important;
  bottom: 2px !important;
}
.simplebar-scrollbar.simplebar-visible::before,
.simplebar-scrollbar.simplebar-visible:before { opacity: 1 !important; }

/* ── Page Loading Animation ────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card, .page-wrapper > .content-wrapper {
  animation: fadeInUp 0.3s ease-out;
}

/* ── Notification Toast Enhancement ────────────────────────────── */
.notifyjs-corner .notifyjs-wrapper .notifyjs-container {
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}

/* ── Empty State ───────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #a0aec0;
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state h4 {
  color: #6C7A8D;
  font-weight: 500;
  margin-bottom: 8px;
}

/* ── Action Button Group (edit/delete) ─────────────────────────── */
.btn-group-action {
  display: inline-flex;
  gap: 6px;
}
.btn-group-action .btn {
  box-shadow: none !important;
  padding: 0 !important;
  width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 6px !important;
  font-size: 12px !important;
}

/* ── Stats/KPI Cards ───────────────────────────────────────────── */
.kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(27,79,138,0.06);
}
.kpi-card .kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--hc-primary, #1B4F8A);
  line-height: 1.2;
}
.kpi-card .kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: #6C7A8D;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.kpi-card .kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}
.kpi-icon-blue   { background: linear-gradient(135deg, #1B4F8A, #3498db); }
.kpi-icon-green  { background: linear-gradient(135deg, #27AE60, #2ecc71); }
.kpi-icon-orange { background: linear-gradient(135deg, #F39C12, #e67e22); }
.kpi-icon-red    { background: linear-gradient(135deg, #E74C3C, #c0392b); }
.kpi-icon-teal   { background: linear-gradient(135deg, #00A99D, #1abc9c); }

/* ── Width Utilities ───────────────────────────────────────────── */
.w-10   { width: 10px; }
.w-30   { width: 30px; }
.w-50   { width: 50px; }
.w-60   { width: 60px; }
.w-100  { width: 100px; }
.w-150  { width: 150px; }
.w-200  { width: 200px; }
.w-300  { width: 300px; }
.w-full { width: 100%; }

/* ── Display ───────────────────────────────────────────────────── */
.d-hide { display: none; }

/* ── Text ──────────────────────────────────────────────────────── */
.text-red         { color: red; }
.text-danger-lg   { font-size: 17px; color: red; }
.text-accent      { font-size: 20px; color: #e91e63; }
.text-upper       { text-transform: uppercase; }
.text-center-mb   { text-align: center; margin-bottom: 20px; }

/* ── Padding ───────────────────────────────────────────────────── */
.p-2px { padding: 2px; }

/* ── Table — Report/Print Style ────────────────────────────────── */
.tbl-report {
  border: 1px solid black;
  border-collapse: collapse;
  border-color: #bccbd3;
  text-align: center;
}

.tbl-report-header {
  border: 1px solid black;
  border-collapse: collapse;
  border-color: #bccbd3;
  background-image: linear-gradient(228deg, black, #fb4000);
  color: #ffffff;
  text-transform: uppercase;
}

.tbl-report-header-center {
  border: 1px solid black;
  border-collapse: collapse;
  border-color: #bccbd3;
  text-align: center;
  background-image: linear-gradient(228deg, black, #fb4000);
  color: #ffffff;
  text-transform: uppercase;
}

.tbl-border {
  border: 1px solid black;
  border-collapse: collapse;
  border-color: #868484;
}

.tbl-col-divider {
  border-right: 1px solid #000;
  border-bottom: none;
  border-top: none;
}

/* ── Back Button ───────────────────────────────────────────────── */
.btn-back {
  font-size: 20px;
  color: #e91e63;
}
.btn-back:hover {
  color: #c2185b;
  text-decoration: none;
}

/* ── Field Required Marker ─────────────────────────────────────── */
.field_required {
  color: red;
  font-weight: bold;
}

/* ── Error Message ─────────────────────────────────────────────── */
.error_msg {
  font-size: 17px;
  color: red;
}

/* ── Card Header Actions ───────────────────────────────────────── */
.new_button {
  background-color: var(--hc-primary, #1B4F8A);
  color: #fff;
  border: none;
  border-radius: var(--hc-radius, 8px);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}
.new_button:hover {
  background-color: #154070;
  color: #fff;
}

/* ── Status Badges ─────────────────────────────────────────────── */
.badge-active {
  background-color: var(--hc-success, #27AE60);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
}
.badge-inactive {
  background-color: var(--hc-danger, #E74C3C);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
}

/* ── Form Layout ───────────────────────────────────────────────── */
.form-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--hc-primary, #1B4F8A);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--hc-accent, #E8F4FD);
}

/* ── Print Styles ──────────────────────────────────────────────── */
@media print {
  .no-print,
  .sidebar,
  .left-sidebar,
  .main-header,
  .footer,
  .btn,
  .dropdown {
    display: none !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
  }
  body {
    background: #fff !important;
    font-size: 12px;
  }
}

/* ── Responsive Table Wrapper ──────────────────────────────────── */
.table-responsive-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Loading Overlay ───────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-overlay .spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--hc-border, #DDE4EE);
  border-top: 4px solid var(--hc-primary, #1B4F8A);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   Sidebar: flow with page (body class "sidebar-static")
   We disable SimpleBar's height clipping so all menu items render
   in document flow — scrolling the page reveals the bottom of
   the sidebar along with the page content.
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  aside.left-sidebar #sidebar.sidebar { overflow: visible !important; }
  aside.left-sidebar .sidebar-left {
    height: auto !important;
    overflow: visible !important;
  }
  aside.left-sidebar .simplebar-wrapper,
  aside.left-sidebar .simplebar-mask,
  aside.left-sidebar .simplebar-offset,
  aside.left-sidebar .simplebar-content-wrapper {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
  }
  aside.left-sidebar .simplebar-track { display: none !important; }
}
@media (max-width: 767.98px) {
  /* Mobile slide-out panel: cap to viewport so the panel scrolls */
  aside.left-sidebar > #sidebar.sidebar > .sidebar-left {
    max-height: calc(100vh - 60px) !important;
    overflow-y: auto !important;
  }
}

/* ════════════════════════════════════════════════════════════════
   Content auto-widen on scroll (desktop only)
   Once the user scrolls past the sidebar, its 250px column is just
   empty gutter. body.sidebar-scrolled-past collapses it to 0 so
   .page-wrapper (flex:1) expands to fill the whole viewport width.
   Toggled by JS in includes/footer.php.
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  aside.left-sidebar { transition: width 0.25s ease, min-width 0.25s ease; }
  body.sidebar-scrolled-past aside.left-sidebar {
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  /* Also kill any inner max-width caps so the content actually fills
     the freed space (Bootstrap .container caps at 540/720/960/1140px). */
  body.sidebar-scrolled-past .content-wrapper .container,
  body.sidebar-scrolled-past .content-wrapper .container-sm,
  body.sidebar-scrolled-past .content-wrapper .container-md,
  body.sidebar-scrolled-past .content-wrapper .container-lg,
  body.sidebar-scrolled-past .content-wrapper .container-xl {
    max-width: 100% !important;
    width: 100% !important;
  }
  body.sidebar-scrolled-past .page-wrapper,
  body.sidebar-scrolled-past .content-wrapper,
  body.sidebar-scrolled-past .content {
    max-width: 100% !important;
    width: 100% !important;
  }
}
