/*
 * Clean White + Blue Theme Override
 * Low-risk approach: typography + color + visual accents only.
 * No structural/layout/DOM behavior overrides.
 */

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

:root {
  --cbb-bg: #f6f9ff;
  --cbb-surface: #ffffff;
  --cbb-primary: #252767;
  --cbb-primary-hover: #1d1f52;
  --cbb-primary-soft: #eaf2ff;
  --cbb-text: #1f2937;
  --cbb-text-muted: #6b7280;
  --cbb-border: #dce6f5;
  --cbb-shadow-blue: rgba(37, 39, 103, 0.28);

  --cbb-success: #16a34a;
  --cbb-warning: #d97706;
  --cbb-danger: #dc2626;
  --cbb-info: #0284c7;
}

html,
body,
button,
input,
select,
textarea,
.btn,
.form-control {
  font-family: 'Poppins', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Force textual UI to Poppins consistently */
body,
body div,
body span,
body p,
body a,
body li,
body ul,
body ol,
body label,
body table,
body th,
body td,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body input,
body select,
body textarea,
body button,
body small,
body strong {
  font-family: 'Poppins', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* Preserve icon fonts */
i.fa,
i[class^="fa-"],
i[class*=" fa-"],
.fa,
[class^="fa-"],
[class*=" fa-"] {
  font-family: FontAwesome !important;
}

[class^="ti-"],
[class*=" ti-"] {
  font-family: themify !important;
}

[class^="pe-7s-"],
[class*=" pe-7s-"] {
  font-family: 'Pe-icon-7-stroke' !important;
}

body,
.content-wrapper {
  background-color: var(--cbb-bg);
  color: var(--cbb-text);
}

.main-header .logo,
.main-header .navbar {
  background-color: var(--cbb-primary);
}

.main-header .navbar {
  position: relative;
}

.main-header .logo .logo-lg img {
  max-height: 46px;
  width: auto;
  object-fit: contain;
}

.main-header .logo .logo-mini img {
  max-height: 24px;
  max-width: 42px;
  width: auto;
  object-fit: contain;
}

.main-header .navbar .nav > li > a,
.main-header .logo,
.main-header .logo:hover,
.main-header .navbar .sidebar-toggle,
.main-header .navbar .sidebar-toggle:hover {
  color: #ffffff;
}

.main-sidebar {
  background-color: var(--cbb-surface);
  border-right: 1px solid var(--cbb-border);
  box-shadow: 0 2px 16px rgba(37, 39, 103, 0.12);
}

.main-sidebar .user-panel {
  display: none !important;
}

.sidebar-menu > li.header {
  color: var(--cbb-text-muted);
  border-bottom: 1px solid var(--cbb-border);
}

.sidebar-menu > li > a {
  color: #143a6a;
  background-color: transparent;
  margin: 6px 10px;
  border-radius: 10px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.sidebar-menu > li:hover > a,
.sidebar-menu > li.active > a {
  background-color: var(--cbb-primary-soft);
  color: var(--cbb-primary-hover);
  box-shadow: 0 10px 20px -14px var(--cbb-shadow-blue), 0 0 0 1px rgba(37, 39, 103, 0.14);
}

.sidebar-menu > li > .treeview-menu {
  background-color: #f8fbff;
  margin: 0 10px 8px;
  border-radius: 10px;
  border: 1px solid #e3edff;
}

.main-sidebar .sidebar-menu .treeview-menu,
.main-sidebar .sidebar-menu > li > .treeview-menu {
  background-color: #f8fbff !important;
}

.main-sidebar .sidebar-menu .treeview-menu > li > a {
  background-color: transparent !important;
  color: #2a4f7e !important;
}

.main-sidebar .sidebar-menu .treeview-menu > li {
  background-color: transparent !important;
}

.sidebar-menu .treeview-menu > li > a {
  color: #2a4f7e;
  border-radius: 8px;
  margin: 2px 6px;
}

.sidebar-menu .treeview-menu > li.active > a,
.sidebar-menu .treeview-menu > li > a:hover {
  background-color: #eaf2ff;
  color: var(--cbb-primary-hover);
  box-shadow: 0 8px 14px -14px var(--cbb-shadow-blue);
}

a {
  color: var(--cbb-primary);
}

a:hover,
a:focus {
  color: var(--cbb-primary-hover);
}

.panel-bd,
.panel,
.box,
.small-box,
.info-box,
.modal-content,
.dropdown-menu {
  border-color: var(--cbb-border);
}

.panel-bd > .panel-heading,
.box-header {
  color: var(--cbb-text);
}

/* Global button system */
.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.1px;
  border-width: 1px;
  transition: all 0.2s ease;
  box-shadow: 0 10px 18px -14px rgba(15, 23, 42, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.btn i {
  margin-right: 4px;
}

.btn i:only-child {
  margin-right: 0;
}

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

.btn:focus,
.btn:active:focus,
.btn.active:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 39, 103, 0.2), 0 12px 18px -14px rgba(15, 23, 42, 0.55);
}

.btn-primary,
.pagination > .active > a,
.pagination > .active > span {
  background: linear-gradient(135deg, #1f4da1 0%, #2563eb 100%);
  border-color: #1f4da1;
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
  background: linear-gradient(135deg, #1d4288 0%, #1e4fc9 100%);
  border-color: #1d4288;
  color: #ffffff;
}

.btn-success {
  background: linear-gradient(135deg, #0e9f6e 0%, #16a34a 100%);
  border-color: #0f8f63;
  color: #ffffff;
}

.btn-success:hover,
.btn-success:focus {
  background: linear-gradient(135deg, #0b8a5f 0%, #14833c 100%);
  border-color: #0b8a5f;
  color: #ffffff;
}

.btn-info {
  background: linear-gradient(135deg, #0b7caf 0%, #0ea5e9 100%);
  border-color: #0b7caf;
  color: #ffffff;
}

.btn-info:hover,
.btn-info:focus {
  background: linear-gradient(135deg, #0a6792 0%, #0284c7 100%);
  border-color: #0a6792;
  color: #ffffff;
}

.btn-warning {
  background: linear-gradient(135deg, #dc8b14 0%, #f59e0b 100%);
  border-color: #c77809;
  color: #ffffff;
}

.btn-warning:hover,
.btn-warning:focus {
  background: linear-gradient(135deg, #c77809 0%, #d97706 100%);
  border-color: #b66c08;
  color: #ffffff;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3b43 0%, #ef4444 100%);
  border-color: #c92f36;
  color: #ffffff;
}

.btn-danger:hover,
.btn-danger:focus {
  background: linear-gradient(135deg, #c92f36 0%, #dc2626 100%);
  border-color: #b8262e;
  color: #ffffff;
}

.btn-default {
  background: #ffffff;
  border-color: #d3deef;
  color: #29436a;
  box-shadow: 0 8px 16px -14px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(37, 39, 103, 0.06);
}

.btn-default:hover,
.btn-default:focus {
  background: #f6f9ff;
  border-color: #c6d5eb;
  color: #1f3b69;
}

.btn-xs {
  border-radius: 8px;
  padding: 2px 9px;
  font-size: 11px;
}

.btn-sm {
  border-radius: 9px;
  padding: 5px 11px;
}

.btn-lg {
  border-radius: 12px;
  padding: 10px 18px;
}

.btn-large {
  border-radius: 12px;
  padding: 9px 16px;
}

.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.btn.disabled:hover,
.btn[disabled]:hover,
fieldset[disabled] .btn:hover {
  transform: none;
}

/* Global table polish */
.content-wrapper .table-responsive {
  border: 1px solid #dce6f5;
  border-radius: 12px;
  overflow: auto;
  background: #ffffff;
  box-shadow: 0 18px 30px -28px rgba(15, 23, 42, 0.45);
}

.content-wrapper .table {
  margin-bottom: 0;
  background: #ffffff;
}

.content-wrapper .table > thead > tr > th,
.content-wrapper .table > tbody > tr > th {
  background: #f4f8ff;
  color: #1f3b69;
  font-weight: 600;
  border-top: 1px solid #dce6f5 !important;
  border-bottom: 1px solid #dce6f5 !important;
}

.content-wrapper .table > tbody > tr > td {
  border-top: 1px solid #e8eef8;
  color: #243447;
}

.content-wrapper .table > tfoot > tr > td,
.content-wrapper .table > tfoot > tr > th {
  background: #f8fbff;
  border-top: 1px solid #dce6f5;
  color: #1f3b69;
  font-weight: 600;
}

.content-wrapper .table td,
.content-wrapper .table th {
  padding: 10px 12px;
  vertical-align: middle;
}

.content-wrapper .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fbfdff;
}

.content-wrapper .table-hover > tbody > tr:hover {
  background-color: #edf4ff;
}

.content-wrapper .table a {
  color: #1f4da1;
  font-weight: 600;
}

.content-wrapper .dataTables_wrapper .dataTables_length select,
.content-wrapper .dataTables_wrapper .dataTables_filter input {
  border: 1px solid #d7e1f3;
  border-radius: 9px;
  height: 34px;
  padding: 6px 10px;
  box-shadow: none;
  color: #1f2937;
}

.content-wrapper .dataTables_wrapper .dataTables_info {
  color: #64748b;
  font-size: 12px;
  padding-top: 12px;
}

.content-wrapper .dataTables_wrapper .dataTables_paginate .pagination > li > a,
.content-wrapper .dataTables_wrapper .dataTables_paginate .pagination > li > span {
  border-radius: 8px !important;
  margin: 0 2px;
  border: 1px solid #dce6f5;
  color: #1f3b69;
  background: #ffffff;
}

.content-wrapper .dataTables_wrapper .dataTables_paginate .pagination > .active > a,
.content-wrapper .dataTables_wrapper .dataTables_paginate .pagination > .active > span {
  color: #ffffff;
  border-color: var(--cbb-primary);
  background: var(--cbb-primary);
}

/* Header quick action buttons (Sale / Receive / Payment / Purchase) */
.top-fixed-link {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
  width: auto;
  max-width: calc(100% - 520px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
  z-index: 3;
}

.top-fixed-link::-webkit-scrollbar {
  height: 0;
}

.top-fixed-link .btn.btn-success.btn-outline {
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%) !important;
  border: 1px solid #cfe0ff !important;
  color: #1f3b69 !important;
  box-shadow: 0 14px 24px -20px rgba(15, 23, 42, 0.9), 0 0 0 1px rgba(37, 39, 103, 0.08);
  font-weight: 600;
  border-radius: 999px !important;
  padding: 7px 15px !important;
  margin: 0 !important;
  min-height: 34px;
}

.top-fixed-link .btn.btn-success.btn-outline i {
  color: #1f4da1 !important;
}

.top-fixed-link a[href*="add_invoice"].btn.btn-success.btn-outline {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  border-color: #b9ddff !important;
  color: #0f4f8c !important;
}

.top-fixed-link a[href*="customer_receive"].btn.btn-success.btn-outline {
  background: linear-gradient(135deg, #ecfdf5 0%, #dcfce7 100%) !important;
  border-color: #b7eecb !important;
  color: #11643f !important;
}

.top-fixed-link a[href*="supplier_payment"].btn.btn-success.btn-outline {
  background: linear-gradient(135deg, #fff8eb 0%, #ffedd5 100%) !important;
  border-color: #ffd9ac !important;
  color: #9a5a0a !important;
}

.top-fixed-link a[href*="add_purchase"].btn.btn-success.btn-outline {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
  border-color: #d7ccff !important;
  color: #4c2f95 !important;
}

.top-fixed-link a[href*="add_invoice"].btn.btn-success.btn-outline i {
  color: #0f4f8c !important;
}

.top-fixed-link a[href*="customer_receive"].btn.btn-success.btn-outline i {
  color: #11643f !important;
}

.top-fixed-link a[href*="supplier_payment"].btn.btn-success.btn-outline i {
  color: #9a5a0a !important;
}

.top-fixed-link a[href*="add_purchase"].btn.btn-success.btn-outline i {
  color: #4c2f95 !important;
}

.top-fixed-link a[href*="invoice_list"].btn.btn-success.btn-outline {
  background: linear-gradient(135deg, #eef7ff 0%, #e0ecff 100%) !important;
  border-color: #bfd6ff !important;
  color: #1f4da1 !important;
}

.top-fixed-link a[href*="invoice_list"].btn.btn-success.btn-outline i {
  color: #1f4da1 !important;
}

.top-fixed-link a[href*="purchase_list"].btn.btn-success.btn-outline {
  background: linear-gradient(135deg, #f4f8ff 0%, #e8efff 100%) !important;
  border-color: #c9d8ff !important;
  color: #3155a3 !important;
}

.top-fixed-link a[href*="purchase_list"].btn.btn-success.btn-outline i {
  color: #3155a3 !important;
}

.top-fixed-link .btn.btn-success.btn-outline:hover,
.top-fixed-link .btn.btn-success.btn-outline:focus {
  background: linear-gradient(135deg, #1f4da1 0%, #2563eb 100%) !important;
  border-color: #1f4da1 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 16px 24px -18px rgba(37, 77, 161, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.top-fixed-link .btn.btn-success.btn-outline:hover i,
.top-fixed-link .btn.btn-success.btn-outline:focus i {
  color: #ffffff !important;
}

.dashboard-reminder-row .dashboard-reminder-action-btn {
  border-radius: 999px;
  background: linear-gradient(135deg, #1f4da1 0%, #2563eb 100%) !important;
  border-color: #1f4da1 !important;
  color: #ffffff !important;
  padding: 4px 11px;
  font-size: 11px;
  line-height: 1.3;
  min-height: 28px;
}

.dashboard-reminder-row .dashboard-reminder-action-btn:hover,
.dashboard-reminder-row .dashboard-reminder-action-btn:focus {
  background: linear-gradient(135deg, #1d4288 0%, #1e4fc9 100%) !important;
  border-color: #1d4288 !important;
  color: #ffffff !important;
}

/* Small action buttons in data tables */
.content-wrapper .dataTable tbody td .btn.btn-xs,
.content-wrapper .dataTable tbody td .btn.btn-sm {
  border-radius: 999px;
  min-width: 30px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 10px;
  margin: 1px 2px;
  box-shadow: 0 10px 16px -14px rgba(15, 23, 42, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.content-wrapper .dataTable tbody td .btn.btn-success.btn-xs,
.content-wrapper .dataTable tbody td .btn.btn-success.btn-sm {
  background: linear-gradient(135deg, #e9fbf2 0%, #d7f7e7 100%);
  border-color: #b8eacc;
  color: #0f6b42;
}

.content-wrapper .dataTable tbody td .btn.btn-info.btn-xs,
.content-wrapper .dataTable tbody td .btn.btn-info.btn-sm {
  background: linear-gradient(135deg, #ebf7ff 0%, #d9eeff 100%);
  border-color: #b6dbff;
  color: #0f4f8c;
}

.content-wrapper .dataTable tbody td .btn.btn-warning.btn-xs,
.content-wrapper .dataTable tbody td .btn.btn-warning.btn-sm {
  background: linear-gradient(135deg, #fff9ed 0%, #ffefcf 100%);
  border-color: #ffdba8;
  color: #9a5a0a;
}

.content-wrapper .dataTable tbody td .btn.btn-danger.btn-xs,
.content-wrapper .dataTable tbody td .btn.btn-danger.btn-sm {
  background: linear-gradient(135deg, #fff1f3 0%, #ffe2e6 100%);
  border-color: #f8c5cc;
  color: #a62830;
}

.content-wrapper .dataTable tbody td .btn.btn-primary.btn-xs,
.content-wrapper .dataTable tbody td .btn.btn-primary.btn-sm {
  background: linear-gradient(135deg, #eef5ff 0%, #dbeaff 100%);
  border-color: #bfd5fb;
  color: #1f4da1;
}

.content-wrapper .dataTable tbody td .btn.btn-success.btn-xs:hover,
.content-wrapper .dataTable tbody td .btn.btn-success.btn-sm:hover,
.content-wrapper .dataTable tbody td .btn.btn-info.btn-xs:hover,
.content-wrapper .dataTable tbody td .btn.btn-info.btn-sm:hover,
.content-wrapper .dataTable tbody td .btn.btn-warning.btn-xs:hover,
.content-wrapper .dataTable tbody td .btn.btn-warning.btn-sm:hover,
.content-wrapper .dataTable tbody td .btn.btn-danger.btn-xs:hover,
.content-wrapper .dataTable tbody td .btn.btn-danger.btn-sm:hover,
.content-wrapper .dataTable tbody td .btn.btn-primary.btn-xs:hover,
.content-wrapper .dataTable tbody td .btn.btn-primary.btn-sm:hover {
  color: #ffffff;
}

.content-wrapper .dataTable tbody td .btn.btn-xs i,
.content-wrapper .dataTable tbody td .btn.btn-sm i {
  margin-right: 0;
  line-height: 1;
}

.content-wrapper .dataTable tbody td .btn.btn-xs:hover,
.content-wrapper .dataTable tbody td .btn.btn-sm:hover {
  transform: translateY(-1px);
}

.content-wrapper .dataTable tbody td .btn.btn-default.btn-xs.disabled,
.content-wrapper .dataTable tbody td .btn.btn-default.btn-xs[disabled] {
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

/* DataTable export/print button group */
.content-wrapper .dt-buttons {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.content-wrapper .dt-buttons .btn,
.content-wrapper .dt-buttons .dt-button,
.content-wrapper button.dt-button,
.content-wrapper a.dt-button,
.content-wrapper div.dt-button {
  border-radius: 10px !important;
  border: 1px solid #d2def2 !important;
  color: #1f3b69 !important;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%) !important;
  box-shadow: 0 10px 16px -14px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(37, 39, 103, 0.05) inset !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
}

.content-wrapper .dt-buttons .btn:hover,
.content-wrapper .dt-buttons .dt-button:hover,
.content-wrapper button.dt-button:hover,
.content-wrapper a.dt-button:hover,
.content-wrapper div.dt-button:hover {
  border-color: #1f4da1 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1f4da1 0%, #2563eb 100%) !important;
  transform: translateY(-1px);
}

.content-wrapper .dt-buttons .dt-button:focus,
.content-wrapper .dt-buttons .btn:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(37, 39, 103, 0.18), 0 10px 16px -14px rgba(15, 23, 42, 0.55) !important;
}

.prints {
  border-radius: 10px !important;
  border: 1px solid #d2def2 !important;
  color: #1f3b69 !important;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%) !important;
  box-shadow: 0 10px 16px -14px rgba(15, 23, 42, 0.55), 0 0 0 1px rgba(37, 39, 103, 0.05) inset !important;
}

.prints:hover,
.prints:focus {
  border-color: #1f4da1 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1f4da1 0%, #2563eb 100%) !important;
}

/* Find / Save / Submit strip consistency */
.content-wrapper .panel .panel-body .form-inline .btn,
.content-wrapper .panel .panel-body .form-group .btn {
  min-height: 34px;
}

button#btn-filter.btn,
button#corr_btn_filter.btn {
  border-radius: 10px;
  min-width: 74px;
  background: linear-gradient(135deg, #1f4da1 0%, #2563eb 100%);
  border-color: #1f4da1;
  color: #ffffff;
}

button#btn-filter.btn:hover,
button#corr_btn_filter.btn:hover,
button#btn-filter.btn:focus,
button#corr_btn_filter.btn:focus {
  background: linear-gradient(135deg, #1d4288 0%, #1e4fc9 100%);
  border-color: #1d4288;
  color: #ffffff;
}

@media (max-width: 1200px) {
  .top-fixed-link {
    gap: 6px;
    max-width: calc(100% - 460px);
  }

  .top-fixed-link .btn.btn-success.btn-outline {
    padding: 5px 10px !important;
    font-size: 11px;
  }
}

@media (max-width: 991px) {
  .top-fixed-link {
    display: none;
  }
}

.navbar-custom-menu .navbar-nav > .notifications-menu > a,
.navbar-custom-menu .navbar-nav > .dropdown-user > a {
  position: relative;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  line-height: 38px !important;
  margin-top: 0 !important;
  border-radius: 50% !important;
  background-color: #ffffff !important;
  color: #252767 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px -14px rgba(37, 39, 103, 0.65), 0 0 0 1px rgba(37, 39, 103, 0.18);
  border: 0 !important;
  overflow: visible !important;
}

.main-header .navbar-custom-menu .navbar-nav > .notifications-menu > a > i,
.main-header .navbar-custom-menu .navbar-nav > .dropdown-user > a > i {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  color: #252767 !important;
  font-size: 17px !important;
  line-height: 1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.navbar-custom-menu .navbar-nav > .notifications-menu > a:hover,
.navbar-custom-menu .navbar-nav > .dropdown-user > a:hover,
.navbar-custom-menu .navbar-nav > .notifications-menu > a:focus,
.navbar-custom-menu .navbar-nav > .dropdown-user > a:focus {
  border-radius: 50% !important;
  background-color: #eef1ff !important;
}

.navbar-custom-menu .navbar-nav > .notifications-menu,
.navbar-custom-menu .navbar-nav > .dropdown-user {
  margin-left: 8px;
}

.navbar-custom-menu .navbar-nav > .notifications-menu > a .label {
  position: absolute;
  top: -2px;
  right: -4px;
}

.notifications-menu .notif-toggle.has-unread {
  animation: cbbBellShake 1.6s ease-in-out infinite;
}

.notifications-menu .notif-toggle.has-unread .label {
  animation: cbbBadgePulse 1.6s ease-in-out infinite;
}

@keyframes cbbBellShake {
  0%, 100% {
    transform: rotate(0deg);
  }
  8% {
    transform: rotate(12deg);
  }
  16% {
    transform: rotate(-10deg);
  }
  24% {
    transform: rotate(8deg);
  }
  32% {
    transform: rotate(-7deg);
  }
  40% {
    transform: rotate(0deg);
  }
}

@keyframes cbbBadgePulse {
  0%, 100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.1);
  }
}

.notification-dropdown-menu {
  width: 390px !important;
  min-width: 390px !important;
  max-width: 390px !important;
  border: 1px solid #d6e2fb !important;
  border-radius: 14px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 24px 30px -26px rgba(15, 23, 42, 0.85), 0 0 0 1px rgba(37, 39, 103, 0.08);
}

.notification-dropdown-menu > li {
  list-style: none;
}

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e3ebfb;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}

.notification-dropdown-header strong,
.notification-dropdown-header small,
.notification-dropdown-header a {
  font-family: 'Poppins', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

.notification-dropdown-header strong {
  color: #1f3b69;
  font-size: 13px;
  display: block;
}

.notification-dropdown-header small {
  color: #6b7280;
  font-size: 11px;
}

.notification-dropdown-header .notification-mark-read {
  font-size: 11px;
  color: #1f4da1 !important;
  font-weight: 600;
  white-space: nowrap;
}

.notification-dropdown-body {
  padding: 0;
}

.notification-dropdown-list {
  max-height: 360px;
  overflow-y: auto;
  background: #ffffff;
}

.notification-item {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-bottom: 1px solid #eef3ff;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.notification-item:hover,
.notification-item:focus {
  background: #f6f9ff;
  transform: translateX(1px);
}

.notification-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #1f4da1;
  margin-top: 2px;
}

.notification-item-icon i {
  margin-right: 0 !important;
  font-size: 14px;
}

.notification-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notification-item-title {
  color: #1f3b69;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.notification-item-text {
  color: #5b6473;
  font-size: 11px;
  line-height: 1.4;
}

.notification-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.notification-item-meta small {
  color: #788397;
  font-size: 10px;
}

.notification-item-action {
  color: #1f4da1 !important;
  font-weight: 600;
}

.notification-level-danger .notification-item-icon {
  background: #fff1f3;
  color: #b4232f;
}

.notification-level-warning .notification-item-icon {
  background: #fff8eb;
  color: #9a5a0a;
}

.notification-level-info .notification-item-icon {
  background: #ecfdf5;
  color: #0f6b42;
}

.notification-empty-state {
  padding: 20px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
}

.notification-dropdown-footer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e3ebfb;
  background: #f8fbff;
}

.notification-dropdown-footer a {
  flex: 1;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #d7e3ff;
  background: #ffffff;
  color: #1f4da1 !important;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none !important;
}

.notification-dropdown-footer a:hover,
.notification-dropdown-footer a:focus {
  border-color: #1f4da1;
  background: #eef4ff;
}

.navbar-custom-menu .navbar-nav > .nav-profile-summary {
  margin-left: 10px;
}

.navbar-custom-menu .navbar-nav > .nav-profile-summary > a {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 4px 12px 4px 4px !important;
  margin-top: 0;
  border-radius: 999px !important;
  background-color: #ffffff !important;
  color: #252767 !important;
  box-shadow: 0 10px 18px -14px rgba(37, 39, 103, 0.65), 0 0 0 1px rgba(37, 39, 103, 0.18);
}

@media (min-width: 992px) {
  .main-header .navbar-custom-menu {
    height: 60px;
    display: flex;
    align-items: center;
  }

  .main-header .navbar-custom-menu .navbar-nav {
    display: flex;
    align-items: center;
  }

  .main-header .navbar-custom-menu .navbar-nav > li {
    float: none;
  }
}

@media (max-width: 767px) {
  .notification-dropdown-menu {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
    right: 0 !important;
    left: auto !important;
  }
}

.navbar-custom-menu .navbar-nav > .nav-profile-summary > a:hover,
.navbar-custom-menu .navbar-nav > .nav-profile-summary > a:focus {
  background-color: #eef1ff !important;
}

.navbar-custom-menu .nav-profile-summary .profile-avatar-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #dbe0ff;
}

.navbar-custom-menu .nav-profile-summary .profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navbar-custom-menu .nav-profile-summary .online-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  right: -1px;
  bottom: -1px;
  background: #16a34a;
  border: 2px solid #ffffff;
}

.navbar-custom-menu .nav-profile-summary .profile-meta {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
}

.navbar-custom-menu .nav-profile-summary .profile-name {
  font-size: 12px;
  font-weight: 600;
  color: #252767;
}

.navbar-custom-menu .nav-profile-summary .profile-level {
  font-size: 10px;
  color: #6b7280;
}

@media (max-width: 1200px) {
  .navbar-custom-menu .nav-profile-summary .profile-meta {
    display: none;
  }

  .navbar-custom-menu .navbar-nav > .nav-profile-summary > a {
    width: 40px;
    padding: 4px !important;
    justify-content: center;
  }
}

.sidebar-menu > li > a,
.sidebar-menu .treeview-menu > li > a,
.sidebar .user-panel .info p,
.sidebar .user-panel .info a {
  font-family: 'Poppins', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

.sidebar-menu > li > a > i {
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 8px;
  background: #eef3ff;
  color: #252767 !important;
  margin-right: 10px;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px #d8e2ff;
}

.sidebar-menu > li:hover > a > i,
.sidebar-menu > li.active > a > i,
.sidebar-menu .treeview-menu > li.active > a > i {
  background: #252767;
  color: #ffffff !important;
  box-shadow: none;
}

.sidebar-mini.sidebar-collapse .sidebar-menu > li > a {
  padding: 12px 5px !important;
  text-align: center;
}

.sidebar-mini.sidebar-collapse .sidebar-menu > li > a > i {
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  margin-right: 0 !important;
  border-radius: 9px !important;
  background: #252767 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 14px -12px rgba(37, 39, 103, 0.75) !important;
  font-size: 15px !important;
}

.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > i,
.sidebar-mini.sidebar-collapse .sidebar-menu > li.active > a > i {
  background: #1d1f52 !important;
}

.main-header .sidebar-toggle .pe-7s-keypad {
  font-size: 0 !important;
}

.main-header .sidebar-toggle .pe-7s-keypad:before {
  font-family: FontAwesome;
  content: "\f100";
  font-size: 18px;
}

.sidebar-mini.sidebar-collapse .main-header .sidebar-toggle .pe-7s-keypad:before {
  content: "\f101";
}

/* Dashboard phase 1 + 2 refresh */
.dashboard-kpi-row .dashboard-kpi-box {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px -30px rgba(15, 23, 42, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  position: relative;
}

.dashboard-kpi-row .dashboard-kpi-box .inner h4 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.15px;
}

.dashboard-kpi-row .dashboard-kpi-box .inner p {
  font-weight: 500;
  opacity: 0.92;
}

.dashboard-kpi-row .dashboard-kpi-box .icon {
  opacity: 0.34;
  top: 8px;
  right: 12px;
}

.dashboard-kpi-row .dashboard-kpi-box .small-box-footer {
  background: rgba(8, 15, 35, 0.14);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.dashboard-reminder-row .dashboard-reminder-panel {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 34px -30px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(37, 39, 103, 0.08);
}

.dashboard-reminder-row .dashboard-reminder-panel .panel-heading {
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  border-bottom: 1px solid #dde6ff;
  padding: 14px 16px;
}

.dashboard-reminder-row .dashboard-reminder-panel .panel-title h4 {
  margin: 0;
  font-weight: 700;
  color: #1f3b69;
}

.dashboard-reminder-row .dashboard-reminder-panel .chart-panel-subtitle {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.dashboard-reminder-row .dashboard-reminder-panel .panel-body {
  padding: 12px 14px 14px;
}

.dashboard-reminder-summary > tbody > tr > td,
.dashboard-reminder-summary > tbody > tr > th,
.dashboard-reminder-table > tbody > tr > td,
.dashboard-reminder-table > thead > tr > th {
  vertical-align: middle !important;
}

.dashboard-reminder-badge {
  font-size: 12px;
  line-height: 1;
  min-width: 34px;
  display: inline-block;
  text-align: center;
  border-radius: 999px;
  padding: 6px 10px;
}

.dashboard-chart-grid {
  display: flex;
  flex-wrap: wrap;
}

.dashboard-chart-grid > [class*="col-"] {
  display: flex;
}

.dashboard-chart-grid .dashboard-chart-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-chart-grid .dashboard-chart-panel .panel-body {
  flex: 1;
}

.dashboard-chart-grid .best-sale-seeall {
  float: right;
}

.dashboard-chart-section .dashboard-chart-panel {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 42px -34px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(37, 39, 103, 0.08);
}

.dashboard-chart-section .dashboard-chart-panel .panel-heading {
  background: linear-gradient(135deg, #f7f9ff 0%, #eef4ff 100%);
  border-bottom: 1px solid #dde6ff;
  padding: 14px 16px;
}

.dashboard-chart-section .dashboard-chart-panel .panel-title {
  position: relative;
}

.dashboard-chart-section .dashboard-chart-panel .panel-title h4 {
  margin: 0;
  color: #1f3b69;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.dashboard-chart-section .chart-panel-subtitle {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.dashboard-chart-section .dashboard-chart-panel .panel-body {
  background-color: #ffffff;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
}

.dashboard-chart-section .dashboard-chart-toolbar {
  margin-top: 10px;
}

.dashboard-chart-section .dashboard-chart-toolbar .form-group {
  margin-bottom: 0;
}

.dashboard-chart-section #alldata {
  border: 1px solid #d7e1ff;
  border-radius: 10px;
  box-shadow: none;
  height: 36px;
}

.dashboard-chart-section .dashboard-filter-btn {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f4da1 0%, #2563eb 100%) !important;
  border: 0;
  color: #ffffff;
  font-weight: 600;
  height: 36px;
}

.dashboard-chart-section .dashboard-filter-btn:hover,
.dashboard-chart-section .dashboard-filter-btn:focus {
  background: linear-gradient(135deg, #1d4288 0%, #1e4fc9 100%) !important;
  color: #ffffff;
}

.dashboard-chart-section .piechartcontainer {
  position: relative;
  min-height: 250px;
  height: 250px;
}

.dashboard-chart-section .pie-legend-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-chart-section .pie-legend-item {
  display: flex;
  align-items: center;
  border: 1px solid #dce6ff;
  border-radius: 12px;
  padding: 6px 10px;
  background: #f8fbff;
  min-height: 32px;
  max-width: 100%;
}

.dashboard-chart-section .pie-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  flex: 0 0 10px;
}

.dashboard-chart-section .pie-legend-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #334155;
  line-height: 1.3;
}

.dashboard-chart-section .pie-legend-label {
  font-weight: 600;
  max-width: 128px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chart-section .pie-legend-value {
  color: #0f172a;
  font-weight: 700;
}

.dashboard-chart-section .pie-legend-percent {
  color: #64748b;
  font-weight: 600;
}

.dashboard-chart-section #expensePieChart,
.dashboard-chart-section #lineChart,
.dashboard-chart-section #yearlyreport {
  min-height: 250px;
  max-height: 250px;
  width: 100% !important;
}

.dashboard-chart-section #lineChart {
  min-height: 260px;
  max-height: 260px;
}

.dashboard-overview-row .panel.panel-bd {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 34px -30px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(37, 39, 103, 0.08);
}

@media (max-width: 991px) {
  .dashboard-chart-section .dashboard-chart-panel .panel-heading {
    padding: 12px 14px;
  }

  .dashboard-chart-section .dashboard-chart-panel .panel-body {
    padding: 14px 12px 10px;
  }

  .dashboard-chart-section .best-sale-seeall {
    float: none;
    display: inline-block;
    margin-top: 10px;
  }

  .dashboard-reminder-row .dashboard-reminder-panel .panel-heading {
    padding: 12px 14px;
  }

  .dashboard-reminder-row .dashboard-reminder-panel .panel-body {
    padding: 12px;
  }

  .dashboard-chart-section .pie-legend-item {
    width: 100%;
    border-radius: 10px;
  }
}

body.login-page-clean {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 14%, rgba(37, 39, 103, 0.14), transparent 36%),
    radial-gradient(circle at 88% 86%, rgba(37, 39, 103, 0.12), transparent 40%),
    linear-gradient(160deg, #f3f5ff 0%, #e9eefb 52%, #edf2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login-page-clean .container-center {
  width: 100%;
  max-width: 470px;
  padding: 20px;
  transform: translateY(-202px);
}

body.login-page-clean .login-hero {
  text-align: center;
  margin-bottom: 14px;
}

body.login-page-clean .panel.panel-bd.login-form-card {
  border: 1px solid #d9e2ff;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 30px 60px -42px rgba(37, 39, 103, 0.55), 0 0 0 1px rgba(37, 39, 103, 0.08);
  overflow: hidden;
}

body.login-page-clean .login-brand {
  text-align: center;
  margin-bottom: 8px;
}

body.login-page-clean .login-brand-logo {
  width: auto;
  max-width: 220px;
  max-height: 74px;
  object-fit: contain;
}

body.login-page-clean .view-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

body.login-page-clean .header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #252767;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px -16px rgba(37, 39, 103, 0.8);
}

body.login-page-clean .header-icon i {
  font-size: 22px;
  color: #ffffff;
}

body.login-page-clean .header-title h3 {
  margin: 0;
  color: #252767;
  font-weight: 700;
  font-size: 40px;
}

body.login-page-clean .login-subtitle {
  margin-top: 8px;
  color: #4f5b84;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

body.login-page-clean .login-dev-credit {
  margin-top: 12px;
  text-align: center;
  color: #4f5b84;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

body.login-page-clean .panel-body {
  padding: 22px 24px 24px;
}

body.login-page-clean .panel-body > .row {
  margin-left: 0;
  margin-right: 0;
}

body.login-page-clean .login-input-group .control-label {
  color: #252767;
  font-weight: 600;
  margin-bottom: 6px;
}

body.login-page-clean .input-with-icon {
  position: relative;
}

body.login-page-clean .input-with-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #252767;
  opacity: 0.7;
}

body.login-page-clean .input-with-icon .form-control {
  height: 44px;
  padding-left: 40px;
  border: 1px solid #d8e2ff;
  border-radius: 12px;
  background-color: #fbfcff;
  box-shadow: none;
}

body.login-page-clean .input-with-icon .form-control:focus {
  border-color: #252767;
  box-shadow: 0 0 0 3px rgba(37, 39, 103, 0.1);
}

body.login-page-clean .help-block.small {
  color: #667085;
}

body.login-page-clean .btn-login-primary {
  min-width: 120px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #252767 !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 14px 26px -18px rgba(37, 39, 103, 0.85);
}

body.login-page-clean .btn-login-primary:hover,
body.login-page-clean .btn-login-primary:focus {
  background: #1d1f52 !important;
}

body.login-page-clean .panel-body a,
body.login-page-clean .panel-body b {
  color: #252767 !important;
}

@media (max-width: 768px) {
  body.login-page-clean .container-center {
    transform: translateY(-182px);
  }

  body.login-page-clean .header-title h3 {
    font-size: 28px;
  }
}

/* Optional utility swatches (for preview/testing only) */
.cbb-swatch-bg { background-color: var(--cbb-bg); }
.cbb-swatch-surface { background-color: var(--cbb-surface); }
.cbb-swatch-primary { background-color: var(--cbb-primary); }
.cbb-swatch-primary-hover { background-color: var(--cbb-primary-hover); }
.cbb-swatch-primary-soft { background-color: var(--cbb-primary-soft); }
.cbb-swatch-border { background-color: var(--cbb-border); }
.cbb-swatch-success { background-color: var(--cbb-success); }
.cbb-swatch-warning { background-color: var(--cbb-warning); }
.cbb-swatch-danger { background-color: var(--cbb-danger); }
.cbb-swatch-info { background-color: var(--cbb-info); }
