/* responsive-fix.css
   Patch responsif global untuk Internal Mutu Institute.
   Fokus: sidebar mobile, content overflow, tabel, form, card, modal, dan kalender.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
}

body {
  overflow-x: hidden;
}

img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

body > .d-flex {
  min-height: 100vh;
  min-width: 0;
}

body > .d-flex > .p-4.w-100,
body > .d-flex > .w-100 {
  min-width: 0;
  flex: 1 1 auto;
}

.mi-sidebar {
  width: 260px;
  min-width: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  flex: 0 0 260px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1045;
}

.mi-sidebar .nav-link {
  border-radius: 0.5rem;
  white-space: normal;
  line-height: 1.25;
}

.mi-sidebar-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1060;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #212529;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.mi-sidebar-toggle:focus {
  outline: 3px solid rgba(13, 110, 253, 0.35);
  outline-offset: 2px;
}

.mi-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

/* Tabel */
.table-responsive,
.mi-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  vertical-align: middle;
}

.table th,
.table td {
  word-break: normal;
}

/* Form dan komponen umum */
.form-control,
.form-select,
.input-group,
.btn,
.card,
.modal-content {
  max-width: 100%;
}

textarea.form-control {
  resize: vertical;
}

.card {
  overflow-wrap: break-word;
}

.badge {
  white-space: normal;
}

.btn {
  white-space: normal;
}

.modal-dialog {
  max-width: calc(100% - 1rem);
}

/* Agar header tombol tidak memaksa layar melebar */
.d-flex.justify-content-between.align-items-center {
  min-width: 0;
  gap: 0.75rem;
}

/* FullCalendar responsive */
.fc {
  max-width: 100%;
}

.fc .fc-toolbar {
  gap: 0.5rem;
}

.fc .fc-toolbar-chunk {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.fc .fc-button {
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
}

/* Print tetap rapi */
@media print {
  .mi-sidebar,
  .mi-sidebar-toggle,
  .mi-sidebar-overlay {
    display: none !important;
  }

  body > .d-flex > .p-4.w-100,
  body > .d-flex > .w-100 {
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (max-width: 991.98px) {
  body > .d-flex {
    display: block !important;
  }

  body > .d-flex > .p-4.w-100,
  body > .d-flex > .w-100 {
    width: 100% !important;
    max-height: none !important;
    min-height: 100vh;
    overflow-y: visible !important;
    padding: 4.4rem 0.9rem 1rem !important;
  }

  .mi-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    min-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 14px 0 34px rgba(0, 0, 0, 0.18);
  }

  .mi-sidebar-toggle {
    display: inline-flex;
  }

  body.mi-sidebar-open {
    overflow: hidden;
  }

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

  body.mi-sidebar-open .mi-sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .row {
    --bs-gutter-x: 1rem;
  }

  .card,
  .bg-white.rounded,
  .bg-white.rounded-3,
  .bg-white.rounded-4 {
    margin-bottom: 1rem;
  }

  .d-flex.justify-content-between.align-items-center {
    align-items: flex-start !important;
    flex-wrap: wrap;
  }

  .d-flex.justify-content-between.align-items-center > * {
    min-width: 0;
  }

  .d-flex.justify-content-between.align-items-center .text-end {
    text-align: left !important;
  }

  .btn-group,
  .btn-toolbar {
    flex-wrap: wrap;
  }

  .fc .fc-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .fc .fc-toolbar-title {
    font-size: 1.2rem !important;
  }
}

@media (max-width: 767.98px) {
  body > .d-flex > .p-4.w-100,
  body > .d-flex > .w-100 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  h1,
  .h1 {
    font-size: 1.65rem;
  }

  h2,
  .h2 {
    font-size: 1.38rem;
  }

  h3,
  .h3 {
    font-size: 1.18rem;
  }

  h4,
  .h4 {
    font-size: 1.05rem;
  }

  .lead,
  p,
  .text-muted {
    overflow-wrap: anywhere;
  }

  .card-body,
  .card.p-4,
  .bg-white.p-4 {
    padding: 1rem !important;
  }

  .row > [class*="col-"] {
    margin-bottom: 0.8rem;
  }

  .modal-dialog {
    margin: 0.5rem auto;
  }

  .modal-body {
    max-height: 72dvh;
    overflow-y: auto;
  }

  .modal-footer {
    gap: 0.5rem;
  }

  .modal-footer .btn,
  .modal-body .btn.w-100,
  form .btn.w-100 {
    min-height: 40px;
  }

  .mi-table-scroll.mi-table-scroll-wide > table.table,
  .table-responsive > table.table {
    min-width: 680px;
  }

  .calendar-table th {
    font-size: 0.72rem !important;
    padding: 6px 2px !important;
  }

  .calendar-table td {
    height: 72px !important;
    padding: 3px !important;
  }

  .event-badge {
    max-width: 96px;
  }

  .fc .fc-view-harness {
    min-height: 520px;
  }

  .fc .fc-daygrid-day-number {
    font-size: 0.78rem;
  }

  .fc .fc-event {
    font-size: 0.72rem;
    padding: 2px 3px !important;
  }

  .login-card {
    margin-top: 2rem !important;
  }
}

@media (max-width: 575.98px) {
  .mi-sidebar {
    width: min(86vw, 300px);
    min-width: min(86vw, 300px);
  }

  .mi-sidebar .fs-5 {
    font-size: 1rem !important;
  }

  .btn {
    font-size: 0.92rem;
  }

  .btn-lg {
    font-size: 1rem;
  }

  .d-grid,
  .btn-group {
    width: 100%;
  }

  .btn-group .btn {
    flex: 1 1 auto;
  }

  .table-sm th,
  .table-sm td {
    padding: 0.45rem;
  }

  .mi-table-scroll.mi-table-scroll-wide > table.table,
  .table-responsive > table.table {
    min-width: 620px;
  }

  .form-check-inline {
    display: block;
    margin-right: 0;
    margin-bottom: 0.4rem;
  }

  .fc .fc-toolbar-title {
    font-size: 1.05rem !important;
  }

  .fc .fc-button {
    font-size: 0.78rem;
    padding: 0.28rem 0.45rem;
  }
}

/* Sidebar status badge untuk menu yang punya pending / perlu approval */
.mi-sidebar .mi-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mi-sidebar .mi-nav-status-badge {
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffc107;
  color: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.16);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.mi-sidebar .nav-link.bg-primary .mi-nav-status-badge {
  background: #fff;
  color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}


/* =========================================================
   Modern UI Refresh + Berita Internal
   ========================================================= */
:root {
  --mi-primary: #2563eb;
  --mi-primary-dark: #1d4ed8;
  --mi-accent: #06b6d4;
  --mi-ink: #0f172a;
  --mi-muted: #64748b;
  --mi-sidebar: #0f172a;
  --mi-sidebar-soft: #1e293b;
  --mi-page-bg: #f6f8fc;
  --mi-card-bg: rgba(255, 255, 255, 0.94);
  --mi-border: rgba(148, 163, 184, 0.22);
  --mi-radius: 18px;
  --mi-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 34rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.10), transparent 32rem),
    var(--mi-page-bg) !important;
  color: var(--mi-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body > .d-flex > .p-4.w-100,
body > .d-flex > .w-100,
.mi-page-content {
  background: transparent;
  padding: 2rem !important;
}

.mi-sidebar {
  width: 286px;
  min-width: 286px;
  flex-basis: 286px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.20), transparent 18rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0b1120 100%) !important;
  border-right: 1px solid rgba(255,255,255,0.08);
  box-shadow: 18px 0 50px rgba(15, 23, 42, 0.08);
}

.mi-brand-block {
  padding: 0.6rem 0.3rem 0.2rem;
}

.mi-brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 0.75rem;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--mi-primary), var(--mi-accent));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.mi-brand-subtitle,
.mi-user-card small {
  color: rgba(226, 232, 240, 0.74) !important;
}

.mi-user-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.mi-sidebar hr {
  opacity: 0.12;
}

.mi-sidebar .nav-link {
  min-height: 44px;
  padding: 0.72rem 0.9rem;
  border-radius: 14px;
  color: rgba(248, 250, 252, 0.86) !important;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.mi-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff !important;
  transform: translateX(3px);
}

.mi-sidebar .nav-link.bg-primary,
.mi-sidebar .nav-link.active {
  background: linear-gradient(135deg, var(--mi-primary), #0ea5e9) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.mi-sidebar .mi-nav-status-badge {
  background: linear-gradient(135deg, #facc15, #fb923c);
  border: 0;
  box-shadow: 0 10px 18px rgba(251, 146, 60, 0.24);
}

.mi-sidebar-toggle {
  background: linear-gradient(135deg, var(--mi-sidebar), var(--mi-primary));
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.25);
}

.card,
.custom-card,
.bg-white.rounded,
.bg-white.rounded-3,
.bg-white.rounded-4 {
  border: 1px solid var(--mi-border) !important;
  border-radius: var(--mi-radius) !important;
  background: var(--mi-card-bg) !important;
  box-shadow: var(--mi-shadow) !important;
}

.card:hover {
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.10) !important;
}

.mi-page-hero {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--mi-border);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(239,246,255,0.82));
  box-shadow: var(--mi-shadow);
}

.mi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  color: var(--mi-primary);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
}

h1, h2, h3, h4, h5, h6,
.fw-bold {
  letter-spacing: -0.025em;
}

.text-muted {
  color: var(--mi-muted) !important;
}

.btn {
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.bg-primary {
  background: linear-gradient(135deg, var(--mi-primary), #0ea5e9) !important;
  border-color: transparent !important;
}

.btn-primary {
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.btn-outline-primary {
  border-color: rgba(37, 99, 235, 0.32) !important;
  color: var(--mi-primary) !important;
}

.btn-outline-primary:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--mi-primary), #0ea5e9) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.form-control,
.form-select {
  border-radius: 14px;
  border-color: rgba(148, 163, 184, 0.34);
  padding: 0.72rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.12);
}

.table {
  --bs-table-bg: transparent;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid var(--mi-border) !important;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  border-color: rgba(226, 232, 240, 0.86) !important;
}

.table tbody tr:hover {
  background: rgba(37, 99, 235, 0.035);
}

.badge {
  border-radius: 999px;
  padding: 0.42rem 0.65rem;
  font-weight: 800;
}

.alert {
  border-radius: 18px;
}

.metric-card,
.mi-stat-card,
.mi-dashboard-news-item,
.mi-news-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric-card:hover,
.mi-stat-card:hover,
.mi-dashboard-news-item:hover,
.mi-news-card:hover {
  transform: translateY(-3px);
}

.mi-dashboard-news-item {
  padding: 1rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.mi-dashboard-news-item:hover {
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.mi-news-cover {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #e2e8f0;
}

.mi-news-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.32), transparent 13rem),
    linear-gradient(135deg, #1e293b, #2563eb);
  color: #fff;
}

.mi-news-cover-placeholder span {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.20);
  font-size: 1.35rem;
  font-weight: 900;
}

.mi-news-detail-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.mi-news-title {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.mi-news-content {
  font-size: 1.04rem;
  line-height: 1.82;
  color: #1f2937;
}

.mi-mini-news-item:last-child {
  border-bottom: 0 !important;
}

.mi-sticky-card {
  position: sticky;
  top: 1rem;
}

.login-card {
  border-radius: 26px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16) !important;
}

body:has(.login-card) {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.18), transparent 24rem),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.15), transparent 24rem),
    #f8fafc !important;
}

@media (max-width: 991.98px) {
  body > .d-flex > .p-4.w-100,
  body > .d-flex > .w-100,
  .mi-page-content {
    padding: 4.7rem 1rem 1rem !important;
  }

  .mi-page-hero {
    padding: 1rem;
  }

  .mi-sticky-card {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .mi-sidebar {
    width: min(88vw, 310px);
    min-width: min(88vw, 310px);
  }

  .mi-news-cover {
    height: 165px;
  }

  .mi-page-hero .btn {
    width: 100%;
  }
}


/* =========================================================
   Unified Modern Sidebar + Mutu Institute Logo
   Patch: 20260629-unified-sidebar-logo
   Tujuan: menyamakan tampilan sidebar di dashboard, berita, dan semua modul.
   ========================================================= */
body > .d-flex > aside.mi-sidebar,
aside#miSidebar.mi-sidebar {
  width: 286px !important;
  min-width: 286px !important;
  flex: 0 0 286px !important;
  padding: 1.55rem 1rem !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.25), transparent 18rem),
    linear-gradient(180deg, #12234a 0%, #0f172a 46%, #0b1120 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 18px 0 50px rgba(15, 23, 42, 0.10) !important;
}

aside#miSidebar.mi-sidebar .mi-brand-block {
  padding: 0.15rem 0.3rem 0.35rem !important;
}

aside#miSidebar.mi-sidebar .mi-brand-logo-wrap {
  width: 82px;
  height: 82px;
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(239,246,255,0.92));
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow:
    0 18px 34px rgba(14, 165, 233, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.92);
  overflow: hidden;
}

aside#miSidebar.mi-sidebar .mi-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

/* Fallback jika masih ada markup lama MI dari cache/server */
aside#miSidebar.mi-sidebar .mi-brand-mark {
  width: 82px !important;
  height: 82px !important;
  border-radius: 24px !important;
  margin-bottom: 0.85rem !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(239,246,255,0.92)) !important;
  color: var(--mi-primary) !important;
}

aside#miSidebar.mi-sidebar .mi-brand-block h4 {
  font-size: 1.48rem;
  line-height: 1.15;
  color: #ffffff !important;
}

aside#miSidebar.mi-sidebar .mi-brand-subtitle {
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.78) !important;
}

aside#miSidebar.mi-sidebar .mi-user-card {
  margin-top: 1.15rem;
  margin-bottom: 1.8rem !important;
  padding: 1.1rem 1rem !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.055)) !important;
  border: 1px solid rgba(255,255,255,0.13) !important;
}

aside#miSidebar.mi-sidebar .nav.nav-pills {
  gap: 0.18rem;
}

aside#miSidebar.mi-sidebar .nav-item {
  margin-bottom: 0.34rem !important;
}

aside#miSidebar.mi-sidebar .nav-link {
  min-height: 46px !important;
  padding: 0.76rem 1rem !important;
  border-radius: 15px !important;
  color: rgba(248, 250, 252, 0.88) !important;
  font-weight: 650 !important;
  letter-spacing: -0.012em;
}

aside#miSidebar.mi-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.105) !important;
  color: #fff !important;
  transform: translateX(3px);
}

aside#miSidebar.mi-sidebar .nav-link.bg-primary,
aside#miSidebar.mi-sidebar .nav-link.active {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%) !important;
  color: #fff !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34) !important;
}

aside#miSidebar.mi-sidebar .mi-nav-status-badge {
  min-width: 25px;
  height: 25px;
  background: linear-gradient(135deg, #facc15, #fb923c) !important;
  color: #1f2937 !important;
  border: 0 !important;
  box-shadow: 0 10px 18px rgba(251, 146, 60, 0.24) !important;
}

aside#miSidebar.mi-sidebar .nav-link.bg-primary .mi-nav-status-badge,
aside#miSidebar.mi-sidebar .nav-link.active .mi-nav-status-badge {
  background: #ffffff !important;
  color: #2563eb !important;
}

@media (max-width: 991.98px) {
  body > .d-flex > aside.mi-sidebar,
  aside#miSidebar.mi-sidebar {
    width: min(88vw, 310px) !important;
    min-width: min(88vw, 310px) !important;
    flex-basis: min(88vw, 310px) !important;
  }

  aside#miSidebar.mi-sidebar .mi-brand-logo-wrap {
    width: 74px;
    height: 74px;
  }

  aside#miSidebar.mi-sidebar .mi-brand-logo {
    width: 66px;
    height: 66px;
  }
}

/* =========================================================
   Leave quota visibility fix
   Modern card refresh sebelumnya menimpa Bootstrap .bg-success/.bg-dark
   sehingga kartu jatah cuti di dashboard/staff terlihat kosong.
   ========================================================= */
.card.bg-primary,
.card.bg-success,
.card.bg-danger,
.card.bg-warning,
.card.bg-info,
.card.bg-dark,
.card.bg-secondary {
  border: 0 !important;
  box-shadow: var(--mi-shadow) !important;
}

.card.bg-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
  color: #fff !important;
}

.card.bg-success {
  background: linear-gradient(135deg, #16a34a, #059669) !important;
  color: #fff !important;
}

.card.bg-danger {
  background: linear-gradient(135deg, #dc2626, #f97316) !important;
  color: #fff !important;
}

.card.bg-dark {
  background: linear-gradient(135deg, #0f172a, #334155) !important;
  color: #fff !important;
}

.card.bg-secondary {
  background: linear-gradient(135deg, #64748b, #475569) !important;
  color: #fff !important;
}

.card.bg-warning {
  background: linear-gradient(135deg, #facc15, #fb923c) !important;
  color: #111827 !important;
}

.card.bg-info {
  background: linear-gradient(135deg, #22d3ee, #38bdf8) !important;
  color: #0f172a !important;
}

.card.bg-primary h1,
.card.bg-primary h2,
.card.bg-primary h3,
.card.bg-primary h4,
.card.bg-primary h5,
.card.bg-primary h6,
.card.bg-success h1,
.card.bg-success h2,
.card.bg-success h3,
.card.bg-success h4,
.card.bg-success h5,
.card.bg-success h6,
.card.bg-danger h1,
.card.bg-danger h2,
.card.bg-danger h3,
.card.bg-danger h4,
.card.bg-danger h5,
.card.bg-danger h6,
.card.bg-dark h1,
.card.bg-dark h2,
.card.bg-dark h3,
.card.bg-dark h4,
.card.bg-dark h5,
.card.bg-dark h6,
.card.bg-secondary h1,
.card.bg-secondary h2,
.card.bg-secondary h3,
.card.bg-secondary h4,
.card.bg-secondary h5,
.card.bg-secondary h6 {
  color: #fff !important;
}

.card.bg-warning h1,
.card.bg-warning h2,
.card.bg-warning h3,
.card.bg-warning h4,
.card.bg-warning h5,
.card.bg-warning h6,
.card.bg-info h1,
.card.bg-info h2,
.card.bg-info h3,
.card.bg-info h4,
.card.bg-info h5,
.card.bg-info h6 {
  color: #111827 !important;
}

.card.bg-primary .text-white-50,
.card.bg-success .text-white-50,
.card.bg-danger .text-white-50,
.card.bg-dark .text-white-50,
.card.bg-secondary .text-white-50 {
  color: rgba(255, 255, 255, 0.72) !important;
}

.card.bg-warning .text-white-50,
.card.bg-info .text-white-50 {
  color: rgba(15, 23, 42, 0.68) !important;
}

/* Kelola Plafon Medical: modal tinggi penuh dengan isi yang dapat di-scroll. */
#plafondModal .modal-dialog.modal-dialog-scrollable {
  height: calc(100dvh - 1rem);
  max-height: calc(100dvh - 1rem);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#plafondModal .medical-plafond-modal-content {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#plafondModal .medical-plafond-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#plafondModal .modal-header,
#plafondModal .modal-footer {
  flex: 0 0 auto;
}

#plafondModal .medical-plafond-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#plafondModal .medical-plafond-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
}

#plafondModal .medical-plafond-table-scroll thead.sticky-top {
  z-index: 2;
}

@media (max-width: 767.98px) {
  #plafondModal .modal-dialog.modal-dialog-scrollable {
    height: calc(100dvh - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
  }

  #plafondModal .medical-plafond-modal-body {
    padding: 0.75rem;
  }
}
