@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700&display=swap");

:root {
  --app-sidebar-width: 220px;
  --app-sidebar-mini-width: 70px;
  --app-header-height: 64px;
  --app-font: "Nunito", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --app-font-weight: 500;
  --app-radius: 10px;
  --field-h: calc(1.5 * 0.875rem + 0.75rem + 2px);
}

html,
body {
  font-family: var(--app-font);
  font-weight: var(--app-font-weight);
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.card-title,
.navbar,
.sidebar-nav,
.table,
button,
.btn,
.form-control,
.select2-container {
  font-family: var(--app-font);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 600;
}

body,
p,
label,
td,
.form-control,
.custom-select,
.custom-file-label,
.input-group-text,
.dropdown-item,
.nav-link,
.sidebar-nav a,
.select2-container,
.select2-selection,
.select2-results__option,
.dataTables_wrapper,
.breadcrumb,
.page-titles,
.card-body,
small,
.small,
.btn-link,
form label {
  font-weight: var(--app-font-weight);
}

/* ---------- Scrollbar ---------- */
* {
  scrollbar-width: thin;
  scrollbar-color: #9aa8b8 #eef2f6;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #eef2f6;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: #9aa8b8;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7b8b9c;
}

/* ---------- Skin / cards ---------- */
body.skin-blue {
  background: #f4f7fb;
}

.skin-blue .topbar {
  background: #0288d1;
  box-shadow: 0 2px 12px rgba(2, 136, 209, 0.18);
}

.page-wrapper {
  background: #f4f7fb;
}

.card {
  border: 0;
  border-radius: var(--app-radius);
  box-shadow: 0 4px 18px rgba(15, 34, 58, 0.06);
}

.card-title {
  font-weight: 700;
}

.btn {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(15, 34, 58, 0.08);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn:hover {
  box-shadow: 0 5px 14px rgba(15, 34, 58, 0.14);
}

.btn:active {
  box-shadow: 0 1px 2px rgba(15, 34, 58, 0.08);
}

.btn-sm {
  border-radius: 7px;
}

.btn-info {
  color: #fff;
  background-color: #0288d1;
  border-color: #0277bd;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:not(:disabled):not(.disabled):active,
.btn-info:not(:disabled):not(.disabled).active {
  color: #fff;
  background-color: #0277bd;
  border-color: #01579b;
}

.alert {
  border-radius: var(--app-radius);
}

/* ---------- Header / sidebar alignment ---------- */
.fixed-layout .topbar,
.fixed-layout .left-sidebar {
  position: fixed;
}

.fixed-layout .topbar {
  top: 0;
  left: 0;
  right: 0;
  height: var(--app-header-height);
  z-index: 50;
}

.fixed-layout .left-sidebar {
  top: 0;
  left: 0;
  height: 100%;
  width: var(--app-sidebar-width);
  padding-top: var(--app-header-height);
  z-index: 40;
}

.left-sidebar .scroll-sidebar {
  height: calc(100% - var(--app-header-height));
}

.topbar .navbar.top-navbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-height: var(--app-header-height);
  height: var(--app-header-height);
  padding: 0;
}

.topbar .top-navbar .navbar-header {
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
  height: var(--app-header-height);
  line-height: var(--app-header-height);
  width: var(--app-sidebar-width);
  min-width: var(--app-sidebar-width);
  max-width: var(--app-sidebar-width);
  flex: 0 0 var(--app-sidebar-width);
  padding: 0 12px;
}

.topbar .top-navbar .navbar-header .navbar-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  height: var(--app-header-height);
  padding: 0;
  margin: 0;
  position: static;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.topbar .top-navbar .navbar-header .navbar-brand b {
  line-height: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.topbar .top-navbar .navbar-header .navbar-brand .light-logo {
  display: inline-block;
}

.app-brand-text {
  position: static;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .navbar-collapse {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  flex: 1 1 auto;
  flex-basis: auto !important;
  min-width: 0;
  width: auto !important;
  height: var(--app-header-height);
  padding: 0 8px 0 0;
}

.topbar-toggles {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: var(--app-header-height);
  margin: 0;
  padding: 0 2px;
}

.topbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: var(--app-header-height);
  color: #fff;
  padding: 0 !important;
  margin: 0;
  line-height: 1 !important;
  text-decoration: none;
}

.topbar-toggle:hover,
.topbar-toggle:focus {
  color: #fff;
}

.topbar-toggle i,
.topbar-toggle i:before {
  display: block;
  font-size: 20px;
  line-height: 1 !important;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.topbar-toggle-desktop {
  display: flex !important;
}

.topbar-toggle-mobile {
  display: none !important;
}

.topbar .navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: var(--app-header-height);
}

.topbar .navbar-nav.navbar-nav-right {
  margin-left: auto;
  flex: 0 0 auto;
}

.topbar .top-navbar .navbar-nav > .nav-item {
  display: flex;
  align-items: center;
  height: var(--app-header-height);
}

.topbar .top-navbar .navbar-nav > .nav-item > .nav-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: var(--app-header-height);
  line-height: 1;
  padding: 0 14px;
  font-size: 18px;
}

.topbar .top-navbar .profile-pic {
  display: flex;
  align-items: center;
}

.topbar .top-navbar .profile-pic img {
  width: 32px;
  height: 32px;
  object-fit: cover;
}

.topbar .dropdown-menu {
  right: 0;
  left: auto;
}

.fixed-layout .page-wrapper {
  padding-top: var(--app-header-height);
}

@media (min-width: 768px) {
  .page-wrapper,
  .footer {
    margin-left: var(--app-sidebar-width);
  }

  .navbar-header {
    width: var(--app-sidebar-width);
    flex-shrink: 0;
  }
}

@media (min-width: 768px) {
  .mini-sidebar .top-navbar .navbar-header {
    width: var(--app-sidebar-mini-width);
    min-width: var(--app-sidebar-mini-width);
    max-width: var(--app-sidebar-mini-width);
    flex-basis: var(--app-sidebar-mini-width);
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }

  .mini-sidebar .app-brand-text {
    display: none;
  }

  .mini-sidebar .top-navbar .navbar-header .navbar-brand {
    justify-content: center;
  }

  .mini-sidebar .left-sidebar {
    width: var(--app-sidebar-mini-width);
  }

  .mini-sidebar .page-wrapper,
  .mini-sidebar .footer {
    margin-left: var(--app-sidebar-mini-width);
  }

  .mini-sidebar .scroll-sidebar {
    height: calc(100vh - var(--app-header-height));
  }
}

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  .topbar .top-navbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
  }

  .topbar .top-navbar .navbar-header {
    width: auto;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
    padding-left: 0;
  }

  .topbar .top-navbar .navbar-header .navbar-brand {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }

  .app-brand-text {
    font-size: 14px;
    max-width: none;
  }

  .topbar-toggle-mobile {
    display: flex !important;
  }

  .topbar-toggle-desktop {
    display: none !important;
  }

  .topbar .navbar-collapse {
    width: auto !important;
    flex: 0 0 auto;
    padding: 0;
    margin-left: 0 !important;
  }

  .page-wrapper,
  .footer {
    margin-left: 0;
  }

  .fixed-layout .left-sidebar,
  .fixed-layout.mini-sidebar .left-sidebar {
    left: calc(-1 * var(--app-sidebar-width));
    width: var(--app-sidebar-width);
    transition: left 0.25s ease;
  }

  .fixed-layout.show-sidebar .left-sidebar,
  .fixed-layout.mini-sidebar.show-sidebar .left-sidebar {
    left: 0;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 34, 58, 0.4);
    z-index: 35;
  }

  .show-sidebar .sidebar-overlay {
    display: block;
  }

  .show-sidebar {
    overflow: hidden;
  }
}

@media (max-width: 1023px) {
  .topbar .d-flex,
  .topbar .d-flex.justify-content-end,
  .dashboard-modern .d-flex {
    display: flex !important;
  }
}

/* ---------- Sidebar menu ---------- */
body.skin-blue .left-sidebar .sidebar-nav ul li a {
  color: #000;
}

body.skin-blue .left-sidebar .sidebar-nav > ul > li > a i,
body.skin-blue .left-sidebar .sidebar-nav ul li a i {
  color: #000;
}

.sidebar-nav .has-arrow::after {
  border-color: #000;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a:hover {
  color: #000;
  background: #e3f2fd;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a:hover i {
  color: #000;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a:hover.has-arrow::after {
  border-color: #000;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a.active,
body.skin-blue .left-sidebar .sidebar-nav > ul > li.active > a {
  color: #fff;
  background: #0277bd;
  border-left-color: #0277bd;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a.active i,
body.skin-blue .left-sidebar .sidebar-nav > ul > li.active > a i {
  color: #fff;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a.active.has-arrow::after,
body.skin-blue .left-sidebar .sidebar-nav > ul > li.active > a.has-arrow::after {
  border-color: #fff;
}

.sidebar-nav ul li ul li a i {
  margin-right: 8px;
  width: 16px;
  display: inline-block;
  text-align: center;
}

.sidebar-nav #sidebarnav > li > a {
  display: flex;
  align-items: center;
}

.sidebar-nav #sidebarnav > li > a i {
  margin-right: 8px;
}

/* ---------- Tables ---------- */
.page-wrapper .container-fluid,
.card,
.card-body,
.row > [class*="col-"] {
  min-width: 0;
}

.table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table-responsive > .table th,
.table-responsive > .table td {
  white-space: nowrap;
}

.table th,
.table td {
  padding: 0.4rem 0.65rem;
  vertical-align: middle;
}

.table thead th {
  padding: 0.5rem 0.65rem;
  font-weight: 700;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  font-family: var(--app-font);
}

/* ---------- Modal add/edit forms: keep the two columns, hide the table look ---------- */
.modal-body table.table {
  display: block;
  width: 100%;
  margin-bottom: 0;
  background: transparent;
  border: 0 !important;
}

.modal-body table.table tbody {
  display: block;
  width: 100%;
}

.modal-body table.table tr {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: transparent !important;
}

.modal-body table.table td,
.modal-body table.table th {
  display: block;
  border: 0 !important;
  background: transparent !important;
  padding: 7px 0;
}

.modal-body table.table tr > td:first-child {
  flex: 0 0 30%;
  width: 30%;
  max-width: 30%;
  padding-top: 14px;
  padding-right: 16px;
  font-weight: 600;
  color: #1a2332;
}

.modal-body table.table tr > td:nth-child(2) {
  flex: 1 1 0%;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.modal-body table.table tr > td[colspan] {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  padding-top: 18px;
  padding-bottom: 2px;
  font-weight: 700;
  color: #01579b;
}

.modal-body table.table tr > td[colspan]:empty {
  padding: 8px 0;
}

.modal-body table.table .form-control:not(.select2-hidden-accessible),
.modal-body table.table .select2-container {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100%;
}

.modal-body table.table canvas,
.modal-body table.table video,
.modal-body table.table img {
  max-width: 100%;
  height: auto;
}

/* ---------- Filter ---------- */
.filter-card .card-title {
  margin-bottom: 1rem;
}

.filter-submit-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
}

.filter-submit-col > br {
  display: none;
}

.filter-submit-col > .btn,
.filter-submit-col > a.btn,
.filter-submit-col .btn[name="s"] {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: 0 !important;
  margin-right: 0;
  float: none !important;
  white-space: nowrap;
}

.filter-submit-col .btn[name="s"] {
  min-width: 96px;
  box-sizing: border-box;
  height: var(--field-h);
  min-height: var(--field-h);
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-submit-col .btn[name="s"] i {
  margin-right: 6px;
}

@media (max-width: 767px) {
  form label:has(+ br + button[name="s"]),
  form label:has(+ br + input[name="s"]) {
    display: none;
  }

  form label:has(+ br + button[name="s"]) + br,
  form label:has(+ br + input[name="s"]) + br {
    display: none;
  }

  form label:has(+ br + button[name="s"]) ~ button[name="s"],
  form label:has(+ br + input[name="s"]) ~ input[name="s"],
  form label:has(+ br + input[name="s"]) ~ button[name="s"] {
    float: right;
  }

  .filter-submit-col {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .filter-submit-col .btn[name="s"] {
    float: none;
    margin-left: 0;
  }
}

@media (min-width: 768px) {
  .filter-submit-col.col-md-12 {
    align-items: flex-end;
    margin-top: 4px;
  }

  .filter-submit-col.col-md-12 > label {
    display: none;
  }

  .filter-submit-col.col-md-12 .btn[name="s"] {
    align-self: flex-end;
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---------- Dashboard ---------- */
.dashboard-modern > h3 {
  font-weight: 700;
  font-size: 16px;
  margin: 2px 0 8px;
}

.dashboard-modern hr {
  margin: 6px 0 12px;
}

.dashboard-modern .card {
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-modern .card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 34, 58, 0.08);
}

.dashboard-modern .card .card-body {
  padding: 10px 12px;
}

.dashboard-modern .card .d-flex.flex-row {
  align-items: center;
}

.dashboard-modern .round {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  line-height: 1;
  border-radius: 10px;
  flex-shrink: 0;
}

.dashboard-modern .round i {
  font-size: 15px;
  line-height: 1;
}

.dashboard-modern .card .m-l-10 {
  margin-left: 10px !important;
  min-width: 0;
}

.dashboard-modern .card h4 {
  font-size: 13px;
  line-height: 1.2;
  margin: 0 0 2px !important;
}

.dashboard-modern .card h3 {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0 !important;
}

.dashboard-modern .card p {
  font-size: 12px;
  line-height: 1.25;
  margin: 1px 0 0 !important;
  color: #6c757d;
}

.dashboard-modern .card h5 {
  font-size: 12px;
  line-height: 1.25;
  margin: 2px 0 0 !important;
  font-weight: 500;
}

.dashboard-modern .card h4 u {
  text-decoration: none;
  border-bottom: 1px solid rgba(3, 169, 243, 0.35);
}

/* ---------- Login ---------- */
body.login-body {
  min-height: 100vh;
  background: #eef4fa;
}

body.login-body .preloader {
  background: #eef4fa;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(2, 136, 209, 0.16), transparent 55%),
    radial-gradient(800px 420px at 108% 112%, rgba(2, 136, 209, 0.12), transparent 52%),
    #eef4fa;
}

.login-shell {
  width: 100%;
  max-width: 880px;
  min-height: 500px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 34, 58, 0.12);
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
  color: #fff;
  background: linear-gradient(165deg, #039be5 0%, #0277bd 52%, #01579b 100%);
}

.login-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 20px;
}

.login-brand-title {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.login-brand-copy {
  margin: 12px 0 0;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.5;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 40px 36px;
}

.login-card {
  width: 100%;
}

.login-card-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #17324d;
}

.login-card-subtitle {
  margin: 6px 0 22px;
  color: #6b7c8d;
  font-size: 14px;
}

.login-form .form-group {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #31475c;
}

.login-field {
  position: relative;
}

.login-field > i {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  color: #7b8b9c;
  font-size: 14px;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-field .form-control {
  height: 46px;
  padding: 10px 42px 10px 40px;
  border: 1px solid #d7e1ea;
  border-radius: 10px;
  box-shadow: none;
  background: #f8fbfe;
}

.login-field .form-control:focus {
  border-color: #0288d1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.12);
}

.login-toggle-password {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 42px;
  height: 46px;
  border: 0;
  background: transparent;
  color: #7b8b9c;
  cursor: pointer;
}

.login-toggle-password:hover {
  color: #0288d1;
}

.login-submit {
  height: 46px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: #0288d1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-submit:hover,
.login-submit:focus {
  background: #0277bd;
}

.login-card .alert {
  margin-bottom: 16px;
  padding: 10px 36px 10px 14px;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
}

@media (max-width: 767px) {
  .login-page {
    padding: 16px 12px;
    align-items: stretch;
  }

  .login-shell {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .login-brand {
    align-items: center;
    padding: 28px 24px 22px;
    text-align: center;
  }

  .login-brand-copy {
    max-width: none;
  }

  .login-panel {
    padding: 24px 20px 28px;
  }
}

/* ---------- Theme blue instead of template pink primary ---------- */
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.topbar-toggle) {
  color: #0288d1;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.topbar-toggle):hover {
  color: #01579b;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a:not(.btn):not(.active),
body.skin-blue .left-sidebar .sidebar-nav ul li a:not(.btn):not(.active) i,
body.skin-blue .left-sidebar .sidebar-nav ul li a:not(.btn):not(.active):hover,
body.skin-blue .left-sidebar .sidebar-nav ul li a:not(.btn):not(.active):hover i {
  color: #000;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a:not(.btn):not(.active).has-arrow::after,
body.skin-blue .left-sidebar .sidebar-nav ul li a:not(.btn):not(.active):hover.has-arrow::after {
  border-color: #000;
}

body.skin-blue .left-sidebar .sidebar-nav ul li a.active:not(.btn),
body.skin-blue .left-sidebar .sidebar-nav > ul > li.active > a:not(.btn),
body.skin-blue .left-sidebar .sidebar-nav ul li a.active:not(.btn) i,
body.skin-blue .left-sidebar .sidebar-nav > ul > li.active > a:not(.btn) i {
  color: #fff;
}

.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled {
  color: #fff;
  background-color: #0288d1;
  border-color: #0288d1;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show > .btn-primary.dropdown-toggle {
  color: #fff;
  background-color: #0277bd;
  border-color: #01579b;
}

.btn-outline-primary {
  color: #0288d1;
  border-color: #0288d1;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
  color: #fff;
  background-color: #0288d1;
  border-color: #0277bd;
}

.custom-control-input:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before {
  border-color: #0288d1;
  background-color: #0288d1;
}

.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before,
.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before {
  background-color: rgba(2, 136, 209, 0.45);
}

a.link:hover,
a.link:focus {
  color: #0288d1;
}

.text-primary {
  color: #0288d1 !important;
}

.badge-primary,
.bg-primary,
.label-primary {
  background-color: #0288d1 !important;
}

.dt-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 0;
  margin-bottom: 14px;
}

.dt-buttons .dt-button,
.dt-buttons button.dt-button,
.dt-buttons a.dt-button,
button.dt-button,
a.dt-button {
  padding: 6px 16px;
  border: 1px solid #0277bd;
  border-radius: 8px;
  background: #0288d1;
  background-image: none;
  color: #fff;
  font-family: var(--app-font);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(15, 34, 58, 0.08);
}

.dt-buttons .dt-button:hover,
.dt-buttons .dt-button:focus,
.dt-buttons .dt-button:active,
.dt-buttons button.dt-button:hover,
.dt-buttons a.dt-button:hover,
button.dt-button:hover,
a.dt-button:hover,
.dt-button:not(.disabled):hover,
.dt-button:not(.disabled):active {
  background: #0277bd;
  background-image: none;
  border-color: #01579b;
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 34, 58, 0.14);
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 14px;
}

.dataTables_wrapper .dataTables_paginate .pagination {
  gap: 6px;
  align-items: center;
}

.dataTables_wrapper .dataTables_paginate .page-item .page-link,
.page-item .page-link {
  min-width: 36px;
  height: 36px;
  margin-left: 0;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e3eaf1;
  border-radius: 8px !important;
  color: #3d4d63;
  background: #fff;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover,
.page-item:not(.active):not(.disabled) .page-link:hover {
  color: #0288d1;
  background: #e8f4fc;
  border-color: #b9dff3;
}

.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.page-item.disabled .page-link {
  color: #9aa8b8;
  background: #fff;
  border-color: #eef2f6;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link:hover,
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link:focus,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current a,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover a,
.dataTables_wrapper .dataTables_paginate .paginate_button.current .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover .page-link,
.page-item.active .page-link,
.page-item.active .page-link:hover,
.page-item.active .page-link:focus {
  color: #fff !important;
  background: #0288d1 !important;
  background-color: #0288d1 !important;
  border-color: #0288d1 !important;
  box-shadow: 0 4px 10px rgba(2, 136, 209, 0.25);
}

/* ---------- Excel import cards ---------- */
.import-card .card-body {
  padding: 20px 22px 18px;
}

.import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.import-head .card-title {
  margin-bottom: 2px;
}

.import-sub {
  margin: 0;
  color: #6c7a89;
  font-size: 13px;
}

.import-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f3f9fd;
  border: 1px solid #d7ebf7;
}

.import-note-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #0277bd;
  font-weight: 700;
}

.import-note ul {
  margin: 0;
  padding-left: 18px;
  color: #3d4d63;
}

.import-note li + li {
  margin-top: 4px;
}

.import-note-warn {
  background: #fff6f6;
  border-color: #f3d0d0;
}

.import-note-warn .import-note-title {
  color: #c62828;
}

.import-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.import-form input[type="file"] {
  box-sizing: border-box;
  flex: 1 1 280px;
  max-width: 460px;
  height: 40px;
  padding: 0 12px;
  border: 1px dashed #b9dff3;
  border-radius: 8px;
  background: #f7fbfe;
  color: #3d4d63;
  font-size: 14px;
  line-height: 38px;
}

.import-form input[type="file"]:focus {
  outline: none;
  border-color: #0288d1;
  box-shadow: 0 0 0 0.15rem rgba(2, 136, 209, 0.16);
}

.import-form input[type="file"]::file-selector-button {
  height: 26px;
  margin: 0 12px 0 0;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: #0288d1;
  color: #fff;
  font-family: var(--app-font);
  font-weight: 700;
  font-size: 14px;
  line-height: 26px;
  vertical-align: middle;
  cursor: pointer;
}

.import-form .btn {
  height: 40px;
  margin: 0;
}

@media (max-width: 575.98px) {
  .import-head {
    flex-direction: column;
  }

  .import-form input[type="file"] {
    max-width: none;
    width: 100%;
  }
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_filter input:focus {
  background-image: linear-gradient(#0288d1, #0288d1), linear-gradient(#e9ecef, #e9ecef);
}

.select2-container--default .select2-results__option {
  border-bottom: 1px solid #e6ebf1;
}

.select2-container--default .select2-results__option:last-child {
  border-bottom: 0;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #0288d1;
}

.form-control:focus {
  border-color: #0288d1;
  box-shadow: 0 0 0 0.15rem rgba(2, 136, 209, 0.16);
}

/* ---------- Buttons fit their label ---------- */
.btn {
  width: auto;
}

#tap_ecash_btn {
  width: 100% !important;
  max-width: 100%;
  display: block;
}

/* ---------- Filter card: bottom padding matches the other sides ---------- */
.filter-card .card-body form > .row {
  margin-bottom: -1rem;
}

/* ---------- Transaction header card: bottom padding matches the other sides ---------- */
.doc-header .card-body > .row:last-child > .form-group,
.doc-header .card-body > form > .row:last-child > .form-group {
  margin-bottom: 0;
}

.doc-header-status {
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  margin-bottom: 12px;
}

.doc-header-status:empty {
  display: none;
}

.doc-header-status .badge {
  float: none;
  margin-bottom: 0;
}

/* ---------- Detail entry: add button lines up with the text field ---------- */
.detail-entry {
  align-items: flex-end;
}

.detail-entry-action .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--field-h);
  min-height: var(--field-h);
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* ---------- Document action bar ---------- */
.doc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.doc-actions .btn,
.doc-actions-right .btn {
  float: none !important;
  margin: 0 !important;
}

.doc-actions form,
.doc-actions-form {
  display: flex;
  margin: 0;
}

/* ---------- PIN confirmation ---------- */
.pin-dialog {
  max-width: 400px;
}

.pin-modal .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 34, 58, 0.18);
}

.pin-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
}

.pin-body {
  padding: 32px 28px 24px;
  text-align: center;
}

.pin-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  background: linear-gradient(165deg, #039be5 0%, #0277bd 100%);
}

.pin-body h4 {
  margin: 0 0 6px;
  font-weight: 700;
}

.pin-body p {
  margin: 0 0 18px;
  color: #6c757d;
}

.pin-input {
  height: 52px;
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.35em;
  border-radius: 12px;
}

.pin-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

/* ---------- Autosave info toast ---------- */
.save-toast {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(165deg, #039be5 0%, #0277bd 100%);
  box-shadow: 0 12px 28px rgba(2, 119, 189, 0.28);
  font-weight: 700;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.save-toast i {
  font-size: 18px;
}

.save-toast.is-visible {
  opacity: 1;
  transform: none;
}

.save-toast.is-error {
  background: linear-gradient(165deg, #ef5350 0%, #c62828 100%);
  box-shadow: 0 12px 28px rgba(198, 40, 40, 0.28);
}

/* ---------- Error pages ---------- */
.error-page .footer {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  text-align: center !important;
  border: 0;
}

/* Filter Cari and detail Tambah match the text field beside or above them. */
.card-body form .row:has(> [class*="col-"] > button[name="s"]),
.card-body form .row:has(> .filter-actions) {
  align-items: flex-end;
}

.card-body form .row > [class*="col-"]:has(> label + br + button[name="s"]),
.card-body form .row > [class*="col-"]:has(> label + button[name="s"]) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.card-body form .row > [class*="col-"]:has(> button[name="s"]) > br,
.form-group:has(> .btn[id^="add_"]) > br {
  display: none;
}

.card-body form .row:has(> [class*="col-"] > button[name="s"]) .form-control:not(textarea),
.card-body form .row:has(> .filter-actions) .form-control:not(textarea),
.card-body form .row:has(> [class*="col-"] > button[name="s"]) .select2-container .select2-selection--single,
.card-body form .row:has(> .filter-actions) .select2-container .select2-selection--single,
.detail-entry .form-control:not(textarea),
.detail-entry .select2-container .select2-selection--single,
.field-add-row .form-control:not(textarea),
.field-add-row .select2-container .select2-selection--single,
.tx-add-row .form-control:not(textarea),
.tx-add-row .select2-container .select2-selection--single,
.row:has(> .form-group > .btn[id^="add_"]:not([id$="_submit"])) > .form-group .form-control:not(textarea),
.row:has(> .form-group > .btn[id^="add_"]:not([id$="_submit"])) > .form-group .select2-container .select2-selection--single,
.input-add > .form-control {
  height: var(--field-h) !important;
  min-height: var(--field-h) !important;
  box-sizing: border-box;
}

.card-body form .row:has(> [class*="col-"] > button[name="s"]) .select2-container--default .select2-selection--single .select2-selection__rendered,
.card-body form .row:has(> .filter-actions) .select2-container--default .select2-selection--single .select2-selection__rendered,
.detail-entry .select2-container--default .select2-selection--single .select2-selection__rendered,
.field-add-row .select2-container--default .select2-selection--single .select2-selection__rendered,
.tx-add-row .select2-container--default .select2-selection--single .select2-selection__rendered,
.row:has(> .form-group > .btn[id^="add_"]:not([id$="_submit"])) > .form-group .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: calc(var(--field-h) - 2px) !important;
}

.card-body form .row:has(> [class*="col-"] > button[name="s"]) .select2-container--default .select2-selection--single .select2-selection__arrow,
.card-body form .row:has(> .filter-actions) .select2-container--default .select2-selection--single .select2-selection__arrow,
.detail-entry .select2-container--default .select2-selection--single .select2-selection__arrow,
.field-add-row .select2-container--default .select2-selection--single .select2-selection__arrow,
.tx-add-row .select2-container--default .select2-selection--single .select2-selection__arrow,
.row:has(> .form-group > .btn[id^="add_"]:not([id$="_submit"])) > .form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: calc(var(--field-h) - 2px) !important;
}

@media (min-width: 768px) {
  .card-body form .row > .filter-submit-col.col-lg-12:has(> button[name="s"]),
  .card-body form .row > .filter-submit-col.col-md-12:has(> label + br + button[name="s"]),
  .card-body form .row > .filter-submit-col.col-md-12:has(> label + button[name="s"]) {
    align-items: flex-end;
  }
}

.card-body form button.btn[name="s"],
.filter-actions > .btn,
.input-add > .btn,
.detail-entry-action > .btn,
.tx-add-btn,
.field-add-row > .form-group > .btn,
.form-group > .btn[id^="add_"]:not([id$="_submit"]) {
  box-sizing: border-box;
  height: var(--field-h) !important;
  min-height: var(--field-h) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-entry,
.field-add-row,
.tx-add-row,
.row:has(> .form-group > .btn[id^="add_"]:not([id$="_submit"])) {
  align-items: flex-end;
}

.card-body form .row > [class*="col-"]:has(> label) > button.btn[name="s"] {
  float: none !important;
  align-self: flex-start;
}

@media (min-width: 768px) {
  .card-body form .row > .filter-submit-col.col-md-12 > button.btn[name="s"] {
    align-self: flex-end;
  }
}
