/* (A) PAGE TRANSITION */
::view-transition-old(root),::view-transition-new(root){animation-duration:0.3s}
@keyframes grow-x{from{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes shrink-x{from{transform:scaleX(1)}to{transform:scaleX(0)}}::view-transition-old(tx){animation:.2s linear both shrink-x}::view-transition-new(tx){animation:.2s linear both grow-x}.tran-x{view-transition-name:tx}
@keyframes grow-y{from{transform:scaleY(0)}to{transform:scaleY(1)}}@keyframes shrink-y{from{transform:scaleY(1)}to{transform:scaleY(0)}}::view-transition-old(ty){animation:.2s linear both shrink-y}::view-transition-new(ty){animation:.2s linear both grow-y}.tran-y{view-transition-name:ty}
@keyframes zoom-in{from{transform:scale(0)}to{transform:scale(1)}}@keyframes zoom-out{from{transform:scale(1)}to{transform:scale(0)}}::view-transition-old(zoom){animation:.2s linear both zoom-out}::view-transition-new(zoom){animation:.2s linear both zoom-in}.tran-zoom{view-transition-name:zoom}

/* (B) ICOMOON */
@font-face{font-family:icomoon;src:url(icomoon.woff) format('woff');font-weight:400;font-style:normal;font-display:block}[class*=" icon-"],[class^=icon-]{font-family:icomoon!important;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.icon-home3:before{content:"\e902"}.icon-pencil:before{content:"\e905"}.icon-image:before{content:"\e90d"}.icon-images:before{content:"\e90e"}.icon-camera:before{content:"\e90f"}.icon-headphones:before{content:"\e910"}.icon-music:before{content:"\e911"}.icon-play:before{content:"\e912"}.icon-dice:before{content:"\e915"}.icon-bullhorn:before{content:"\e91a"}.icon-connection:before{content:"\e91b"}.icon-feed:before{content:"\e91d"}.icon-mic:before{content:"\e91e"}.icon-file-empty:before{content:"\e924"}.icon-files-empty:before{content:"\e925"}.icon-file-text2:before{content:"\e926"}.icon-file-zip:before{content:"\e92b"}.icon-copy:before{content:"\e92c"}.icon-paste:before{content:"\e92d"}.icon-stack:before{content:"\e92e"}.icon-folder:before{content:"\e92f"}.icon-folder-open:before{content:"\e930"}.icon-folder-plus:before{content:"\e931"}.icon-folder-minus:before{content:"\e932"}.icon-folder-download:before{content:"\e933"}.icon-folder-upload:before{content:"\e934"}.icon-price-tag:before{content:"\e935"}.icon-barcode:before{content:"\e937"}.icon-qrcode:before{content:"\e938"}.icon-cart:before{content:"\e93a"}.icon-coin-dollar:before{content:"\e93b"}.icon-credit-card:before{content:"\e93f"}.icon-phone:before{content:"\e942"}.icon-address-book:before{content:"\e944"}.icon-envelop:before{content:"\e945"}.icon-pushpin:before{content:"\e946"}.icon-location:before{content:"\e947"}.icon-map:before{content:"\e94b"}.icon-history:before{content:"\e94d"}.icon-clock2:before{content:"\e94f"}.icon-alarm:before{content:"\e950"}.icon-bell:before{content:"\e951"}.icon-calendar:before{content:"\e953"}.icon-printer:before{content:"\e954"}.icon-keyboard:before{content:"\e955"}.icon-display:before{content:"\e956"}.icon-laptop:before{content:"\e957"}.icon-mobile:before{content:"\e958"}.icon-tablet:before{content:"\e95a"}.icon-floppy-disk:before{content:"\e962"}.icon-drive:before{content:"\e963"}.icon-database:before{content:"\e964"}.icon-undo:before{content:"\e965"}.icon-redo:before{content:"\e966"}.icon-undo2:before{content:"\e967"}.icon-redo2:before{content:"\e968"}.icon-forward:before{content:"\e969"}.icon-reply:before{content:"\e96a"}.icon-bubble:before{content:"\e96b"}.icon-user:before{content:"\e971"}.icon-users:before{content:"\e972"}.icon-user-plus:before{content:"\e973"}.icon-user-minus:before{content:"\e974"}.icon-user-check:before{content:"\e975"}.icon-quotes-left:before{content:"\e977"}.icon-quotes-right:before{content:"\e978"}.icon-hour-glass:before{content:"\e979"}.icon-spinner:before{content:"\e97a"}.icon-spinner11:before{content:"\e984"}.icon-search:before{content:"\e986"}.icon-zoom-in:before{content:"\e987"}.icon-zoom-out:before{content:"\e988"}.icon-enlarge:before{content:"\e989"}.icon-shrink:before{content:"\e98a"}.icon-enlarge2:before{content:"\e98b"}.icon-shrink2:before{content:"\e98c"}.icon-key:before{content:"\e98d"}.icon-lock:before{content:"\e98f"}.icon-unlocked:before{content:"\e990"}.icon-wrench:before{content:"\e991"}.icon-equalizer:before{content:"\e992"}.icon-cog:before{content:"\e994"}.icon-hammer:before{content:"\e996"}.icon-magic-wand:before{content:"\e997"}.icon-bug:before{content:"\e999"}.icon-pie-chart:before{content:"\e99a"}.icon-stats-dots:before{content:"\e99b"}.icon-stats-bars2:before{content:"\e99d"}.icon-gift:before{content:"\e99f"}.icon-glass:before{content:"\e9a0"}.icon-mug:before{content:"\e9a2"}.icon-rocket:before{content:"\e9a5"}.icon-meter:before{content:"\e9a6"}.icon-hammer2:before{content:"\e9a8"}.icon-fire:before{content:"\e9a9"}.icon-bin2:before{content:"\e9ad"}.icon-briefcase:before{content:"\e9ae"}.icon-airplane:before{content:"\e9af"}.icon-truck:before{content:"\e9b0"}.icon-shield:before{content:"\e9b4"}.icon-power:before{content:"\e9b5"}.icon-switch:before{content:"\e9b6"}.icon-power-cord:before{content:"\e9b7"}.icon-clipboard:before{content:"\e9b8"}.icon-list-numbered:before{content:"\e9b9"}.icon-list:before{content:"\e9ba"}.icon-list2:before{content:"\e9bb"}.icon-tree:before{content:"\e9bc"}.icon-menu:before{content:"\e9bd"}.icon-menu2:before{content:"\e9be"}.icon-cloud:before{content:"\e9c1"}.icon-cloud-download:before{content:"\e9c2"}.icon-cloud-upload:before{content:"\e9c3"}.icon-cloud-check:before{content:"\e9c4"}.icon-download2:before{content:"\e9c5"}.icon-upload2:before{content:"\e9c6"}.icon-download3:before{content:"\e9c7"}.icon-upload3:before{content:"\e9c8"}.icon-sphere:before{content:"\e9c9"}.icon-earth:before{content:"\e9ca"}.icon-link:before{content:"\e9cb"}.icon-flag:before{content:"\e9cc"}.icon-attachment:before{content:"\e9cd"}.icon-eye:before{content:"\e9ce"}.icon-eye-plus:before{content:"\e9cf"}.icon-eye-minus:before{content:"\e9d0"}.icon-eye-blocked:before{content:"\e9d1"}.icon-bookmark:before{content:"\e9d2"}.icon-star-empty:before{content:"\e9d7"}.icon-star-half:before{content:"\e9d8"}.icon-star-full:before{content:"\e9d9"}.icon-heart:before{content:"\e9da"}.icon-heart-broken:before{content:"\e9db"}.icon-smile2:before{content:"\e9e2"}.icon-sad2:before{content:"\e9e6"}.icon-warning:before{content:"\ea07"}.icon-notification:before{content:"\ea08"}.icon-question:before{content:"\ea09"}.icon-plus:before{content:"\ea0a"}.icon-minus:before{content:"\ea0b"}.icon-info:before{content:"\ea0c"}.icon-cancel-circle:before{content:"\ea0d"}.icon-blocked:before{content:"\ea0e"}.icon-cross:before{content:"\ea0f"}.icon-checkmark:before{content:"\ea10"}.icon-enter:before{content:"\ea13"}.icon-exit:before{content:"\ea14"}.icon-play3:before{content:"\ea1c"}.icon-pause2:before{content:"\ea1d"}.icon-stop2:before{content:"\ea1e"}.icon-backward2:before{content:"\ea1f"}.icon-forward3:before{content:"\ea20"}.icon-first:before{content:"\ea21"}.icon-last:before{content:"\ea22"}.icon-previous2:before{content:"\ea23"}.icon-next2:before{content:"\ea24"}.icon-eject:before{content:"\ea25"}.icon-volume-high:before{content:"\ea26"}.icon-volume-medium:before{content:"\ea27"}.icon-volume-low:before{content:"\ea28"}.icon-volume-mute:before{content:"\ea29"}.icon-volume-mute2:before{content:"\ea2a"}.icon-volume-increase:before{content:"\ea2b"}.icon-volume-decrease:before{content:"\ea2c"}.icon-loop:before{content:"\ea2d"}.icon-loop2:before{content:"\ea2e"}.icon-arrow-up:before{content:"\ea32"}.icon-arrow-right:before{content:"\ea34"}.icon-arrow-down:before{content:"\ea36"}.icon-arrow-left:before{content:"\ea38"}.icon-circle-up:before{content:"\ea41"}.icon-circle-right:before{content:"\ea42"}.icon-circle-down:before{content:"\ea43"}.icon-circle-left:before{content:"\ea44"}.icon-move-up:before{content:"\ea46"}.icon-move-down:before{content:"\ea47"}.icon-sort-alpha-asc:before{content:"\ea48"}.icon-sort-alpha-desc:before{content:"\ea49"}.icon-sort-numeric-asc:before{content:"\ea4a"}.icon-sort-numberic-desc:before{content:"\ea4b"}.icon-sort-amount-asc:before{content:"\ea4c"}.icon-sort-amount-desc:before{content:"\ea4d"}.icon-checkbox-checked:before{content:"\ea52"}.icon-checkbox-unchecked:before{content:"\ea53"}.icon-radio-checked:before{content:"\ea54"}.icon-radio-checked2:before{content:"\ea55"}.icon-radio-unchecked:before{content:"\ea56"}.icon-make-group:before{content:"\ea58"}.icon-scissors:before{content:"\ea5a"}.icon-filter:before{content:"\ea5b"}.icon-table2:before{content:"\ea71"}.icon-insert-template:before{content:"\ea72"}.icon-embed:before{content:"\ea7f"}.icon-embed2:before{content:"\ea80"}.icon-terminal:before{content:"\ea81"}.icon-share2:before{content:"\ea82"}.icon-google:before{content:"\ea88"}.icon-facebook:before{content:"\ea90"}.icon-youtube:before{content:"\ea9d"}.icon-github:before{content:"\eab0"}.icon-pinterest:before{content:"\ead1"}.icon-paypal:before{content:"\ead8"}.icon-file-pdf:before{content:"\eadf"}.icon-file-word:before{content:"\eae1"}.icon-file-excel:before{content:"\eae2"}.icon-libreoffice:before{content:"\eae3"}.icon-html-five:before{content:"\eae4"}
.ico, .ico-sm, [class*=" icon-"], [class^=icon-] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.ico{font-size:24px}.ico-sm{font-size:16px}

/* (C) WIDGETS */
#cb-loading{transition:opacity .3s}.cb-hide{opacity:0;visibility:hidden;height:0}.cb-pg-hide{display:none}
#cb-loading{width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:999;background:rgba(0,0,0,.7)}#cb-loading .spinner-border{width:80px;height:80px}
.head{background:#ddd}.zebra .d-flex{background:#fff;margin-bottom:10px}.zebra .d-flex:nth-child(odd){background-color:#f1f1f1}.pagination{border:1px solid #d0e8ff;background:#f0f8ff}

/* (D) ADMIN & NAVBAR */
#cb-body,body{min-height:100vh}#cb-toggle{display:none}#cb-side{width:155px;flex-shrink:0}#cb-side a{color:#fff}#cb-side .mi{color:#6a6a6a}@media screen and (max-width:768px){#cb-toggle{display:block}#cb-side{display:none}#cb-side.show{display:block}}

.navbar {
  position: relative;
  z-index: 1040;
  overflow: visible !important;
}
.navbar .container-fluid {
  overflow: visible !important;
}
.dropdown {
  position: relative;
}
.dropdown-menu {
  z-index: 1065 !important;
}

/* (E) MOBILE VIEWPORT & ZERO HORIZONTAL SCROLL FIT */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
}

#cb-body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  min-height: 100vh;
}

#cb-body > .flex-grow-1 {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.container, .container-fluid {
  max-width: 100% !important;
}

/* Input groups and Search Bars */
.input-group {
  display: flex !important;
  align-items: stretch;
  flex-wrap: nowrap !important;
}
.input-group > .input-group-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.input-group > .form-control,
.input-group > .form-select {
  min-width: 0;
}
.input-group > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* (F) TABLE INTERNAL HORIZONTAL SCROLLING */
.table-responsive {
  width: 100%;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  display: block;
  margin-bottom: 0;
  position: relative;
}

/* Custom smooth scrollbar for table-responsive */
.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 9999px;
}
.table-responsive::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
}

.table-responsive > table {
  margin-bottom: 0;
  width: 100%;
}

.table-nowrap th,
.table-nowrap td {
  white-space: nowrap !important;
}

/* Mobile specific resets */
@media screen and (max-width: 768px) {
  #cb-body > .flex-grow-1 > .p-2,
  #cb-body > .flex-grow-1 > .p-md-3,
  #cb-body > .flex-grow-1 > .p-lg-4 {
    padding: 0.5rem !important;
    overflow-x: hidden;
    max-width: 100vw !important;
  }

  .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    max-width: 100% !important;
  }

  .row {
    margin-left: -0.25rem !important;
    margin-right: -0.25rem !important;
  }

  .row > * {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Any table not in a table-responsive container gets automatic internal scrolling */
  table.table:not(.table-responsive table) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .input-group {
    flex-wrap: nowrap !important;
    max-width: 100% !important;
  }

  .input-group > .form-control,
  .input-group > .form-select {
    flex: 1 1 auto;
    min-width: 0 !important;
  }

  .btn-group {
    flex-wrap: wrap;
    max-width: 100%;
  }

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

  .card {
    max-width: 100% !important;
    word-wrap: break-word;
  }

  .card-body {
    padding: 0.75rem !important;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .text-truncate {
    max-width: 100% !important;
  }

  .nav-pills, .nav-tabs {
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }

  .d-flex {
    min-width: 0;
  }

  .modal-dialog {
    margin: 0.5rem auto !important;
    max-width: calc(100% - 1rem) !important;
  }
}

/* (G) REVAMPED MODERN ALERTS, TOASTS & MODALS */

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  z-index: 1090 !important;
  pointer-events: none;
}
.cb-toast-modern {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  border-radius: 18px !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.cb-toast-modern.showing,
.cb-toast-modern.show {
  animation: cbToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes cbToastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.cb-toast-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-right: 1rem;
  transition: all 0.25s ease;
}
.cb-badge-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}
.cb-badge-danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}
.cb-badge-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.18);
}
.cb-badge-info, .cb-badge-primary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
}
.cb-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  transform-origin: left;
  transform: scaleX(0);
}
.cb-toast-progress-active {
  animation: cbToastProgress 3.8s linear forwards;
}
@keyframes cbToastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* --- MODAL DIALOGS --- */
.modal-backdrop.show {
  opacity: 0.65;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background-color: #0f172a;
}
.cb-modal-modern .modal-dialog {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.cb-modal-modern.fade .modal-dialog {
  transform: scale(0.92) translateY(12px);
}
.cb-modal-modern.show .modal-dialog {
  transform: scale(1) translateY(0);
}
.cb-modal-modern .modal-content {
  border-radius: 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  background: #ffffff !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden;
}
.cb-modal-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: cbIconPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cbIconPop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.cb-modal-badge-primary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  border: 1px solid rgba(191, 219, 254, 0.8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}
.cb-modal-badge-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  border: 1px solid rgba(167, 243, 208, 0.8);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15);
}
.cb-modal-badge-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  border: 1px solid rgba(253, 230, 138, 0.8);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15);
}
.cb-modal-badge-danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border: 1px solid rgba(254, 202, 202, 0.8);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.15);
}

.cb-modal-modern .modal-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.cb-modal-modern .modal-body {
  font-size: 0.965rem;
  line-height: 1.6;
  color: #334155 !important;
}
.cb-modal-modern .btn-close {
  background-color: #f1f5f9;
  border-radius: 50%;
  padding: 0.55rem;
  opacity: 0.65;
  transition: all 0.2s ease;
}
.cb-modal-modern .btn-close:hover {
  opacity: 1;
  background-color: #e2e8f0;
  transform: scale(1.08);
}
.cb-modal-modern .btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cb-modal-modern .btn:hover {
  transform: translateY(-1px);
}
.cb-modal-modern .btn:active {
  transform: translateY(0);
}

/* --- IN-PAGE ALERTS REVAMP --- */
.alert {
  border-radius: 14px !important;
  border: none !important;
  border-left: 4px solid transparent !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.alert:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}
.alert-primary {
  background-color: #eff6ff !important;
  border-left-color: #3b82f6 !important;
  color: #1e40af !important;
}
.alert-success {
  background-color: #ecfdf5 !important;
  border-left-color: #10b981 !important;
  color: #065f46 !important;
}
.alert-warning {
  background-color: #fffbeb !important;
  border-left-color: #f59e0b !important;
  color: #92400e !important;
}
.alert-danger {
  background-color: #fef2f2 !important;
  border-left-color: #ef4444 !important;
  color: #991b1b !important;
}
.alert-info {
  background-color: #f0fdfa !important;
  border-left-color: #0d9488 !important;
  color: #115e59 !important;
}
.alert-secondary {
  background-color: #f8fafc !important;
  border-left-color: #94a3b8 !important;
  color: #334155 !important;
}