:root {
  --sidebar-width: 280px;
  --sidebar-mini-width: 84px;
  --admin-bg: #f5f7fb;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f8fafc;
  --admin-border: #dbe4ef;
  --admin-text: #1f2937;
  --admin-muted: #6b7280;
  --admin-primary: #2563eb;
  --admin-primary-dark: #1d4ed8;
  --admin-success: #0f766e;
  --admin-warning: #d97706;
  --admin-danger: #dc2626;
  --admin-sidebar: #111827;
  --admin-sidebar-soft: #1f2937;
  --admin-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.06);
  --admin-shadow: 0 18px 46px rgba(15, 23, 42, 0.09);
  --admin-shadow-lg: 0 26px 70px rgba(15, 23, 42, 0.12);
  --admin-ring: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #f8fbff 0%, var(--admin-bg) 42%, #eef4fa 100%);
  color: var(--admin-text);
  font-family: "Segoe UI", Arial, sans-serif;
}

a {
  text-decoration: none;
}

.admin-shell {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  /* Reserve scrollbar gutter to keep inner content width stable so header/footer dividers align with scrollbar */
  scrollbar-gutter: stable;
  background: var(--admin-sidebar);
  color: #ffffff;
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18);
  transform: translateX(0);
  transition: width 0.2s ease, transform 0.2s ease;
}

.sidebar-header {
  padding: 1.35rem 1.25rem 1.15rem;
  margin-inline: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: #ffffff;
}

.brand-mark:hover,
.brand-mark:focus {
  color: #ffffff;
}

.brand-icon,
.profile-avatar,
.metric-icon,
.nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 800;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #ffffff;
}

.brand-icon.brand-icon-img {
  background: #ffffff;
  overflow: hidden;
  padding: 4px;
}

.brand-icon.brand-icon-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand .brand-icon.brand-icon-img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
}

.brand-copy,
.brand-title,
.brand-subtitle,
.nav-text,
.sidebar-footer-text {
  min-width: 0;
  transition: opacity 0.16s ease, width 0.16s ease;
}

.brand-title,
.brand-subtitle {
  display: block;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-subtitle {
  color: #9ca3af;
  font-size: 0.78rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.45rem;
  padding: 1.1rem 1rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.78rem 0.9rem;
  border-radius: 8px;
  color: #d1d5db;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
  background: var(--admin-sidebar-soft);
  color: #ffffff;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  transform: translateX(2px);
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #bfdbfe;
  font-size: 0.76rem;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  margin-inline: 1.25rem;
  padding: 1rem 0;
  color: #d1d5db;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  white-space: nowrap;
}

.sidebar-user {
  margin: auto 1rem 1rem;
  padding: 0.85rem;
  display: grid;
  justify-items: center;
  gap: 0.22rem;
  border: 1px solid var(--admin-sidebar-border);
  border-radius: 8px;
  background: var(--admin-sidebar-soft);
  text-align: center;
}

.sidebar-user-avatar {
  border: 3px solid #53e9b9;
}

.sidebar-user strong {
  color: var(--admin-sidebar-text-strong);
  font-size: 1rem;
  line-height: 1.1;
}

.sidebar-user small {
  color: var(--admin-sidebar-muted);
  font-size: 0.84rem;
}

.status-dot,
.notification-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot {
  flex: 0 0 auto;
  background: #22c55e;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  left: 0;
  z-index: 1030;
  display: none;
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.55);
  transition: opacity 0.2s ease;
}

body.sidebar-open .sidebar-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background: var(--admin-sidebar);
  color: #ffffff;
  box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18);
  transform: translateX(0);
  transition: width 0.2s ease, left 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  visibility: visible;
  will-change: transform;
}

.admin-main {
  width: auto;
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  transition: margin-left 0.2s ease;
}

.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  min-height: 72px;
  border-bottom: 1px solid var(--admin-border);
  box-shadow: var(--admin-shadow-sm);
}

.admin-navbar.bg-white {
  background-color: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(14px);
}

.sidebar-toggle {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  gap: 4px;
  padding: 9px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: var(--admin-ring);
}

.sidebar-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  background: var(--admin-text);
  border-radius: 999px;
}

.search-input {
  max-width: 520px;
  border-color: var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
  min-height: 42px;
  box-shadow: none;
}

.search-input:focus {
  border-color: #93c5fd;
  box-shadow: var(--admin-ring);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-button,
.profile-button {
  border: 1px solid var(--admin-border);
  background: #ffffff;
  color: var(--admin-text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.icon-button:hover,
.icon-button:focus,
.profile-button:hover,
.profile-button:focus {
  border-color: #bfdbfe;
  box-shadow: var(--admin-ring);
}

.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--admin-danger);
}

.notification-menu {
  width: min(320px, calc(100vw - 2rem));
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: var(--admin-shadow);
}

.notification-menu .dropdown-item {
  display: grid;
  gap: 0.2rem;
  padding-block: 0.7rem;
}

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

.notification-time {
  color: var(--admin-muted);
  font-size: 0.82rem;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-weight: 700;
}

.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e0ecff;
  color: var(--admin-primary-dark);
  font-size: 0.76rem;
}

.avatar-img {
  display: block;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.avatar-md {
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.avatar-xl {
  width: 78px;
  height: 78px;
  border-radius: 50%;
}

.profile-button .avatar-sm {
  border: 2px solid #52e7b8;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .profile-button .avatar-sm {
  border-color: #54f0be;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.dashboard-content {
  min-height: calc(100vh - 132px);
}

.dashboard-content > .container-fluid {
  padding-top: 1.75rem !important;
  padding-bottom: 1.75rem !important;
}

.page-heading,
.panel-header,
.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.page-heading {
  margin-bottom: 1.35rem;
}

.page-heading h1 {
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--admin-primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.btn {
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

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

.btn-primary {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--admin-primary-dark);
  background: var(--admin-primary-dark);
}

.metric-card,
.panel {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}

.metric-card {
  position: relative;
  min-height: 164px;
  padding: 1.35rem;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--metric-color, var(--admin-primary));
}

.metric-card:hover {
  border-color: #c6d5e8;
  box-shadow: var(--admin-shadow-lg);
  transform: translateY(-3px);
}

.metric-primary {
  --metric-color: var(--admin-primary);
}

.metric-success {
  --metric-color: var(--admin-success);
}

.metric-warning {
  --metric-color: var(--admin-warning);
}

.metric-danger {
  --metric-color: var(--admin-danger);
}

.metric-label {
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--metric-color, var(--admin-primary));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.metric-success .metric-icon {
  background: #e7f6f3;
}

.metric-warning .metric-icon {
  background: #fff4df;
}

.metric-danger .metric-icon {
  background: #ffecec;
}

.metric-value {
  margin-top: 1rem;
  color: var(--admin-text);
  font-size: 2.18rem;
  font-weight: 800;
  line-height: 1;
}

.metric-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
  color: var(--admin-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.panel {
  padding: 1.35rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.panel:hover {
  border-color: #c6d5e8;
  box-shadow: var(--admin-shadow-lg);
}

.panel-header {
  margin-bottom: 1.25rem;
}

.panel-header p {
  font-size: 0.92rem;
}

.chart-bars {
  height: 292px;
  display: grid;
  grid-template-columns: repeat(6, minmax(38px, 1fr));
  align-items: end;
  gap: 1rem;
  padding: 1.2rem 0.4rem 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.chart-column {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 0.6rem;
  color: var(--admin-muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.chart-column span {
  width: 100%;
  height: var(--bar-size);
  min-height: 28px;
  display: block;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--admin-primary), var(--admin-success));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.bar-42 {
  --bar-size: 42%;
}

.bar-58 {
  --bar-size: 58%;
}

.bar-51 {
  --bar-size: 51%;
}

.bar-72 {
  --bar-size: 72%;
}

.bar-66 {
  --bar-size: 66%;
}

.bar-83 {
  --bar-size: 83%;
}

.activity-list {
  display: grid;
  gap: 1.1rem;
}

.activity-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--admin-border);
}

.activity-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.45rem;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08);
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: var(--admin-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
    min-width: 30px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.table tbody tr {
  transition: background 0.16s ease;
}

.table tbody tr:hover {
  background: #f8fbff;
}

.badge {
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.table-search {
  width: min(260px, 100%);
  border-color: var(--admin-border);
  border-radius: 8px;
}

.table-media {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--admin-border);
}

.profile-avatar-lg {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  font-size: 1.5rem;
}

.profile-hero {
  display: grid;
  justify-items: center;
}

.profile-card {
  overflow: hidden;
}

.profile-cover {
    margin: -1.35rem -1.35rem 0.9rem;
    height: 180px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.profile-photo {
  margin-top: -44px;
  border: 4px solid var(--admin-surface);
  box-shadow: var(--admin-shadow-sm);
}

.info-list,
.settings-list,
.legend-list {
  display: grid;
  gap: 0.85rem;
}

.info-list div,
.mini-card,
.settings-row,
.legend-list div {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface-soft);
}

.info-list div,
.legend-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
}

.info-list span,
.mini-card span,
.settings-row small {
  color: var(--admin-muted);
  font-size: 0.84rem;
}

.info-list strong,
.mini-card strong {
  text-align: right;
}

.mini-card {
  display: grid;
  gap: 0.35rem;
  min-height: 104px;
  align-content: center;
  padding: 1rem;
}

.mini-card strong {
  color: var(--admin-text);
  font-size: 1.05rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
}

.settings-row span {
  display: grid;
  gap: 0.2rem;
}

.donut-chart {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--admin-primary) 0 42%, var(--admin-success) 42% 68%, var(--admin-warning) 68% 86%, var(--admin-danger) 86% 100%);
  box-shadow: var(--admin-shadow-sm);
}

.donut-chart span {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  color: var(--admin-text);
  font-size: 1.65rem;
  font-weight: 800;
}

.legend-list div {
  padding: 0.75rem 0.85rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.legend-list strong {
  margin-left: auto;
}

.progress {
  height: 1.15rem;
  border-radius: 8px;
  background: #e8eef6;
}

.progress-bar {
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.progress-42 {
  width: 42%;
}

.progress-58 {
  width: 58%;
}

.progress-72 {
  width: 72%;
}

.blank-panel {
  min-height: 440px;
  display: grid;
  place-items: center;
  text-align: center;
}

.blank-state {
  max-width: 440px;
  display: grid;
  justify-items: center;
}

.blank-visual {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin-bottom: 0.9rem;
}

.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fbff 0%, #eaf2ff 44%, #eef8f6 100%);
}

.auth-page,
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-card,
.error-card {
  width: min(100%, 460px);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--admin-shadow-lg);
}

.auth-card {
  padding: 1.5rem;
}

.auth-visual {
    margin-bottom: 1rem;
    height: 150px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    overflow: hidden;
}

.auth-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.error-card {
  padding: 2rem;
  text-align: center;
}

.error-illustration {
  width: min(260px, 100%);
  max-height: 132px;
  object-fit: contain;
  margin: 0 auto 0.55rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--admin-text);
}

.auth-brand:hover,
.auth-brand:focus {
  color: var(--admin-text);
}

.auth-brand span:last-child {
  display: grid;
  line-height: 1.2;
}

.auth-brand small,
.auth-footer {
  color: var(--admin-muted);
}

.auth-footer {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.92rem;
}

.error-code {
  color: var(--admin-primary);
  font-size: clamp(5rem, 18vw, 8rem);
  font-weight: 800;
  line-height: 1;
}

.admin-footer {
  margin-top: 2rem;
  padding: 0;
  color: var(--admin-muted);
  font-size: 0.85rem;
}

.admin-footer .container-fluid {
  display: block;
}

.admin-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding: 1rem 1.35rem;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  box-shadow: var(--admin-shadow-sm);
}

.admin-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.admin-footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-success));
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.admin-footer-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.admin-footer-brand-text strong {
  color: var(--admin-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-footer-brand-text small {
  color: var(--admin-muted);
  font-size: 0.72rem;
}

.admin-footer-links {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-footer-links a {
  color: var(--admin-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.admin-footer-links a:hover {
  color: var(--admin-primary);
}

.admin-footer-dot {
  color: var(--admin-border);
  font-size: 0.6rem;
}

.admin-footer-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.admin-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--admin-success);
  font-size: 0.72rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .admin-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

@media (min-width: 992px) {
  body.sidebar-mini .admin-sidebar {
    width: var(--sidebar-mini-width);
  }

  body.sidebar-mini .admin-main {
    margin-left: var(--sidebar-mini-width);
  }

  body.sidebar-mini .brand-copy,
  body.sidebar-mini .nav-text,
  body.sidebar-mini .sidebar-footer-text {
    width: 0;
    opacity: 0;
    overflow: hidden;
  }

  body.sidebar-mini .sidebar-header,
  body.sidebar-mini .sidebar-footer {
    margin-inline: 1rem;
    padding-inline: 0;
  }

  body.sidebar-mini .sidebar-nav .nav-link {
    /* justify-content: center; */
    padding-inline: 0.65rem;
  }

  body.sidebar-mini .sidebar-nav .nav-link:hover,
  body.sidebar-mini .sidebar-nav .nav-link:focus {
    transform: none;
  }
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    width: min(var(--sidebar-width), calc(100vw - 48px));
    left: -100%;
    transform: translateX(0);
    visibility: hidden;
  }

  .admin-main {
    margin-left: 0;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .admin-sidebar {
    left: 0 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .page-heading,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .heading-actions {
    width: 100%;
    justify-content: stretch;
  }

  .heading-actions .btn {
    flex: 1 1 0;
  }

  .chart-bars {
    height: 220px;
    gap: 0.6rem;
    padding-inline: 0.25rem;
  }

  .metric-value {
    font-size: 1.85rem;
  }

  .metric-card,
  .panel {
    padding: 1.1rem;
  }

  .admin-footer .container-fluid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-nav .nav-link,
  .sidebar-toggle,
  .icon-button,
  .profile-button,
  .btn,
  .metric-card,
  .panel,
  .table tbody tr {
    transition: none;
  }

  .sidebar-nav .nav-link:hover,
  .sidebar-nav .nav-link:focus,
  .btn:hover,
  .btn:focus,
  .metric-card:hover {
    transform: none;
  }
}

html[data-theme="dark"] {
  --admin-bg: #0f172a;
  --admin-surface: #182235;
  --admin-surface-soft: #111827;
  --admin-border: #2f3b52;
  --admin-text: #e5edf7;
  --admin-muted: #9aa8bd;
  --admin-primary: #60a5fa;
  --admin-primary-dark: #3b82f6;
  --admin-success: #2dd4bf;
  --admin-warning: #fbbf24;
  --admin-danger: #f87171;
  --admin-sidebar: #090f1d;
  --admin-sidebar-soft: #172033;
  --admin-shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.24);
  --admin-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  --admin-shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.42);
  --admin-ring: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

html[data-theme="dark"] body {
  background: linear-gradient(180deg, #111827 0%, var(--admin-bg) 48%, #0b1120 100%);
}

.brand-icon {
  font-size: 1.1rem;
}

.nav-icon {
  font-size: 0.95rem;
}

.admin-navbar.bg-white,
.sidebar-toggle,
.icon-button,
.profile-button {
  background-color: var(--admin-surface) !important;
  color: var(--admin-text);
}

html[data-theme="dark"] .admin-navbar.bg-white {
  background-color: rgba(24, 34, 53, 0.92) !important;
}

html[data-theme="dark"] .profile-avatar {
  background: #1e3a5f;
  color: #bfdbfe;
}

.page-heading-copy {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-width: 0;
}

.page-icon,
.section-title i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--admin-primary-dark);
}

.page-icon {
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.section-title i {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
}

html[data-theme="dark"] .page-icon,
html[data-theme="dark"] .section-title i {
  background: #1e3a5f;
  color: #bfdbfe;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-light {
  border-color: var(--admin-border);
  background: var(--admin-surface-soft);
  color: var(--admin-text);
}

.btn-outline-secondary {
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  border-color: var(--admin-primary);
  background: #eaf2ff;
  color: var(--admin-primary-dark);
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus {
  background: #1e3a5f;
  color: #bfdbfe;
}

html[data-theme="dark"] .chart-bars {
  background: linear-gradient(180deg, #111827 0%, #182235 100%);
}

html[data-theme="dark"] .table tbody tr:hover {
  background: #111827;
}

html[data-theme="dark"] .progress {
  background: #243149;
}

html[data-theme="dark"] .auth-body {
  background: linear-gradient(135deg, #0b1120 0%, #111827 48%, #10201f 100%);
}

.auth-card,
.error-card {
  background: var(--admin-surface);
}

.dropdown-menu,
.modal-content,
.accordion-item,
.accordion-button {
  border-color: var(--admin-border);
  background-color: var(--admin-surface);
  color: var(--admin-text);
}

.dropdown-item,
.accordion-body {
  color: var(--admin-text);
}

.dropdown-item:hover,
.dropdown-item:focus,
.accordion-button:not(.collapsed) {
  background-color: var(--admin-surface-soft);
  color: var(--admin-text);
}

.form-control,
.form-select {
  border-color: var(--admin-border);
  background-color: var(--admin-surface);
  color: var(--admin-text);
}

.form-control:focus,
.form-select:focus {
  border-color: #93c5fd;
  background-color: var(--admin-surface);
  color: var(--admin-text);
  box-shadow: var(--admin-ring);
}

.form-control::placeholder {
  color: var(--admin-muted);
}

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

html[data-theme="dark"] .text-body {
  color: var(--admin-text) !important;
}

html[data-theme="dark"] .text-bg-secondary {
  background-color: #334155 !important;
  color: #e5edf7 !important;
}

@media (max-width: 767.98px) {
  .navbar-actions {
    gap: 0.5rem;
  }

  .icon-button,
  .profile-button,
  .sidebar-toggle {
    width: 40px;
    height: 40px;
  }

  .profile-button {
    padding: 0.3rem;
  }

  .page-heading-copy {
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .page-heading-copy {
    width: 100%;
  }

  .page-icon {
    width: 44px;
    height: 44px;
  }

  .panel-header .d-flex,
  .panel-header .form-control,
  .panel-header .form-select {
    width: 100%;
  }
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body,
.admin-navbar,
.admin-sidebar,
.admin-main,
.metric-card,
.panel,
.auth-card,
.error-card,
.dropdown-menu,
.modal-content,
.form-control,
.form-select {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.table {
  --bs-table-color: var(--admin-text);
  --bs-table-border-color: var(--admin-border);
  color: var(--admin-text);
}

/* Form labels: text black/dark; only required asterisk stays red */
.form-label,
.field-label,
.award-label,
.erp-label,
.tx-label,
.na-label,
.sms-field-label,
.pay-field-label,
.zisco-crud-label {
  color: #111827 !important;
}
.form-label .text-danger,
.field-label .text-danger,
.award-label .text-danger,
.erp-label .text-danger,
.tx-label .text-danger,
.na-label .text-danger,
.sms-field-label .text-danger,
.pay-field-label .text-danger,
.zisco-crud-label .text-danger {
  color: #dc3545 !important;
}

.page-link {
  border-color: var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-text);
}

.page-link:hover,
.page-link:focus {
  border-color: var(--admin-primary);
  background: var(--admin-surface-soft);
  color: var(--admin-primary);
}

.page-item.active .page-link {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
  color: #ffffff;
}

.page-item.disabled .page-link {
  border-color: var(--admin-border);
  background: var(--admin-surface-soft);
  color: var(--admin-muted);
}

.alert {
  border-radius: 8px;
}

html[data-theme="dark"] .alert-primary {
  border-color: #1d4ed8;
  background: rgba(37, 99, 235, 0.16);
  color: #bfdbfe;
}

html[data-theme="dark"] .alert-success {
  border-color: #0f766e;
  background: rgba(15, 118, 110, 0.18);
  color: #99f6e4;
}

html[data-theme="dark"] .alert-warning {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.18);
  color: #fde68a;
}

html[data-theme="dark"] .alert-danger {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.16);
  color: #fecaca;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .accordion-item {
  border-color: var(--admin-border);
}

html[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(180%);
}

html[data-theme="dark"] .text-bg-info {
  background-color: #0e7490 !important;
  color: #ecfeff !important;
}

html[data-theme="dark"] .text-bg-warning {
  background-color: #b45309 !important;
  color: #fff7ed !important;
}

html[data-theme="dark"] .text-bg-success {
  background-color: #0f766e !important;
  color: #ecfdf5 !important;
}

html[data-theme="dark"] .text-bg-danger {
  background-color: #b91c1c !important;
  color: #fef2f2 !important;
}

@media (max-width: 991.98px) {
  .dashboard-content > .container-fluid {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  .admin-sidebar {
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 767.98px) {
  .panel-header {
    align-items: flex-start;
  }

  .panel-header > .d-flex {
    width: 100%;
  }

  .table-search {
    width: 100%;
  }

  .auth-page,
  .error-page {
    padding: 1rem;
  }

  .auth-card,
  .error-card {
    padding: 1.15rem;
  }
}

@media (max-width: 420px) {
  .heading-actions {
    width: 100%;
  }

  .heading-actions .btn {
    width: 100%;
  }

  .metric-card {
    min-height: 146px;
  }

  .profile-avatar-lg {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 575.98px) {
  .avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .avatar-xl {
    width: 70px;
    height: 70px;
  }

  .profile-cover {
    height: 82px;
    margin-bottom: 0.75rem;
  }

  .profile-photo {
    margin-top: -38px;
  }

  .auth-visual {
    height: 82px;
  }

  .product-thumb {
    width: 36px;
    height: 36px;
  }
}

html:not([data-theme="dark"]) {
  --admin-sidebar: #ffffff;
  --admin-sidebar-soft: #d3e1fc;
  --admin-sidebar-border: #dbe4ef;
  --admin-sidebar-text: #475569;
  --admin-sidebar-text-strong: #0f172a;
  --admin-sidebar-muted: #64748b;
  --admin-sidebar-icon-bg: #eaf2ff;
  --admin-sidebar-icon: #2563eb;
  --admin-sidebar-shadow: 18px 0 42px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] {
  --admin-sidebar-border: rgba(255, 255, 255, 0.08);
  --admin-sidebar-text: #d1d5db;
  --admin-sidebar-text-strong: #ffffff;
  --admin-sidebar-muted: #9ca3af;
  --admin-sidebar-icon-bg: rgba(255, 255, 255, 0.08);
  --admin-sidebar-icon: #bfdbfe;
  --admin-sidebar-shadow: 18px 0 42px rgba(0, 0, 0, 0.34);
}

.admin-sidebar {
  border-right: 1px solid var(--admin-sidebar-border);
  background: var(--admin-sidebar);
  color: var(--admin-sidebar-text-strong);
  box-shadow: var(--admin-sidebar-shadow);
}

.sidebar-header {
  border-bottom-color: var(--admin-sidebar-border);
}

.brand-mark,
.brand-mark:hover,
.brand-mark:focus {
  color: var(--admin-sidebar-text-strong);
}

.brand-subtitle {
  color: var(--admin-sidebar-muted);
}

.sidebar-nav .nav-link {
  color: var(--admin-sidebar-text);
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
  background: var(--admin-sidebar-soft);
  color: var(--admin-sidebar-text-strong) !important;
}

.nav-icon {
  background: var(--admin-sidebar-icon-bg);
  color: var(--admin-sidebar-icon);
}

.sidebar-footer {
  border-top-color: var(--admin-sidebar-border);
  color: var(--admin-sidebar-text);
}

/*  DataTables toolbar / export / pagination ── */
.dt-export-btn,
.dt-button.dt-export,
.dt-buttons .dt-button {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    color: #030712 !important;
    padding: 7px 12px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    height: 36px !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}
.dt-export-btn:hover,
.dt-button.dt-export:hover,
.dt-buttons .dt-button:hover {
    background: #f9fafb !important;
    color: #030712 !important;
}
.dt-buttons {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    gap: .35rem;
    align-items: center;
    float: none !important;
    width: auto !important;
}
.dt-button-down-arrow { margin-left: .35rem; font-size: 10px; opacity: .7; }

div.dt-button-collection {
    min-width: 150px !important;
    padding: 8px !important;
    border-radius: 14px !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    box-shadow: 0 12px 32px rgba(15,23,42,.16) !important;
    z-index: 1060 !important;
}
div.dt-button-collection .dt-button {
    display: block !important;
    width: 100% !important;
    margin: 0 0 6px !important;
    padding: 8px 12px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    text-align: left !important;
    height: auto !important;
}
div.dt-button-collection .dt-button:last-child { margin-bottom: 0 !important; }
div.dt-button-collection .dt-button:hover { background: #f8fafc !important; }

.dataTables_wrapper .dataTables_length {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
}
.dataTables_wrapper .dataTables_length label {
    display: inline-flex !important;
    align-items: center;
    gap: .35rem;
    margin: 0 !important;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}
.dataTables_wrapper .dataTables_length select {
    min-width: 64px;
    width: auto !important;
    height: 36px !important;
    padding: 6px 10px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-size: 12px !important;
    color: #030712 !important;
}

.dt-search-box { position: relative; display: inline-block; }
.dt-search-box .dt-search-input,
.dataTables_wrapper .dataTables_filter input {
    height: 36px !important;
    min-width: 220px;
    padding: 7px 12px 7px 34px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #fff !important;
    font-size: 13px !important;
    color: #030712 !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.02);
}
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center;
    gap: .35rem;
    margin: 0 !important;
    font-size: 0 !important;
    color: transparent;
}
.dt-search-box .dt-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    background: no-repeat center / contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M11 18a7 7 0 100-14 7 7 0 000 14z'/%3E%3C/svg%3E");
    pointer-events: none;
}
.dataTables_wrapper .dataTables_filter { position: relative; }

/* Classic DataTables footer: info left, pagination right — same baseline everywhere */
.dataTables_wrapper .dataTables_info {
    font-size: 0.8125rem !important;
    color: #64748b !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    text-align: left !important;
    width: auto !important;
    line-height: 1.5 !important;
}
.dt-footer-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap;
    gap: .65rem;
    margin-top: .75rem;
    width: 100%;
    clear: both;
}
.dt-info-wrap,
.dt-paginate-wrap {
    min-width: 0;
    display: flex !important;
    align-items: center !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}
.dt-info-wrap {
    flex: 1 1 auto;
    justify-content: flex-start;
}
.dt-paginate-wrap {
    flex: 0 0 auto;
    margin-left: auto !important;
    justify-content: flex-end;
}

/* Fallback when i/p are direct siblings (no footer wrapper) */
.dataTables_wrapper > .dataTables_info,
.dataTables_wrapper > div > .dataTables_info {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle;
}
.dataTables_wrapper > .dataTables_paginate,
.dataTables_wrapper > div > .dataTables_paginate {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle;
    float: right !important;
}
.dt-table-scroll {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.dt-table-scroll::-webkit-scrollbar { height: 8px; }
.dt-table-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* Default BS5 DataTables bottom row (info + paginate) — one straight line */
.dataTables_wrapper > .row:has(.dataTables_info),
.dataTables_wrapper > .row:has(.dataTables_paginate) {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin-top: 0.75rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
}
.dataTables_wrapper > .row:has(.dataTables_info) > [class*="col-"],
.dataTables_wrapper > .row:has(.dataTables_paginate) > [class*="col-"] {
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    float: none !important;
}
.dataTables_wrapper > .row:has(.dataTables_paginate) > [class*="col-"]:has(.dataTables_paginate) {
    justify-content: flex-end !important;
    flex: 0 1 auto !important;
    margin-left: auto !important;
}
.dataTables_wrapper > .row:has(.dataTables_info) > [class*="col-"]:has(.dataTables_info) {
    justify-content: flex-start !important;
}

/* Reset BS5 DataTables LI (.paginate_button.page-item) — never style the LI */
.dataTables_wrapper .dataTables_paginate {
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    text-align: right !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}
.dataTables_wrapper .dataTables_paginate .pagination {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 0;
    margin: 0 !important;
    padding: 0 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.page-item,
.dataTables_wrapper .dataTables_paginate .page-item {
    display: inline-flex !important;
    align-items: center !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.page-item:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.page-item.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.page-item.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.page-item:hover:not(.disabled) {
    background: transparent !important;
    border: 0 !important;
    color: inherit !important;
    box-shadow: none !important;
}

/* Only the <a.page-link> is the visible button — match settings pagination */
.dataTables_wrapper .dataTables_paginate .page-link {
    display: inline-block !important;
    min-width: auto;
    height: auto !important;
    margin: 0 !important;
    padding: 0.35rem 0.65rem !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem !important;
    background: #fff !important;
    color: #0d6efd !important;
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: #0a58ca !important;
    z-index: 2;
}
.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 {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
    border-radius: 0.25rem !important;
    z-index: 3;
}
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link:hover {
    background: #fff !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
    opacity: 1;
    cursor: default !important;
}

/* Non-Bootstrap DT renderer fallback (plain <a.paginate_button>) */
.dataTables_wrapper .dataTables_paginate > .paginate_button,
.dataTables_wrapper .dataTables_paginate span .paginate_button {
    display: inline-block !important;
    min-width: auto !important;
    height: auto !important;
    margin-left: 2px !important;
    padding: 0.35rem 0.65rem !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.25rem !important;
    background: #fff !important;
    color: #0d6efd !important;
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate > .paginate_button.current,
.dataTables_wrapper .dataTables_paginate span .paginate_button.current {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate > .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate span .paginate_button.disabled {
    color: #6c757d !important;
    cursor: default !important;
}

.dt-toolbar-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: .75rem !important;
    margin-bottom: .85rem;
}
.dt-left-toolbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: .5rem !important;
    width: auto !important;
    min-width: 0;
    float: none !important;
}
.dt-left-toolbar > .dataTables_length,
.dt-left-toolbar > .dt-buttons {
    flex: 0 0 auto !important;
    float: none !important;
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    position: static !important;
}
.dt-left-toolbar > .dt-buttons {
    flex-wrap: nowrap !important;
    gap: .35rem !important;
}
.dataTables_wrapper .dt-toolbar-row .dataTables_filter {
    margin: 0 0 0 auto !important;
    float: none !important;
    text-align: right !important;
}

/* Settings / Zisco CRUD */

/* ── Core CRUD layout ── */
.zisco-crud-page .zisco-crud-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
}
.zisco-crud-form-panel {
    border: 1px dashed var(--admin-border, #d1d5db);
    border-radius: 12px;
    background: #fff;
    padding: 1rem;
    height: 100%;
}
.zisco-crud-form-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.zisco-crud-form-title i { font-size: 1rem; color: #64748b; }
.zisco-crud-label,
.award-settings-page .award-label,
.award-rule-modal .field-label,
.award-program-modal .field-label,
.translations-page .tr-field-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}
.zisco-crud-btn-add,
.award-settings-page .btn-save-award,
.award-rule-modal .btn-save-rule,
.award-program-modal .btn-save-program,
.translations-page .tr-btn-add,
.translations-page .tr-save-btn,
.pm-btn-update {
    background: #6366f1;
    border-color: #6366f1;
    padding: 0.35rem 1rem;
    font-weight: 500;
}
.zisco-crud-btn-add:hover,
.award-settings-page .btn-save-award:hover,
.award-rule-modal .btn-save-rule:hover,
.award-program-modal .btn-save-program:hover,
.translations-page .tr-btn-add:hover,
.translations-page .tr-save-btn:hover,
.pm-btn-update:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}
.zisco-crud-item-card,
.tags-list-card {
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 10px;
    background: #f8fafc;
    padding: 1rem 1.15rem;
    height: 100%;
}
.zisco-crud-item-title { font-size: 0.875rem; font-weight: 600; color: #1e293b; margin-bottom: 0.35rem; }
.zisco-crud-item-meta { font-size: 0.75rem; color: #64748b; margin-bottom: 0; }
.zisco-crud-item-meta p { font-size: 0.75rem; color: #64748b; margin-bottom: 0.15rem; }
.zisco-crud-item-meta span { color: #1e293b; font-weight: 500; }
.zisco-crud-btn-edit,
.award-program-page .ap-btn-edit {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.zisco-crud-btn-edit:hover,
.award-program-page .ap-btn-edit:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}
.zisco-crud-btn-delete,
.award-program-page .ap-btn-delete {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}
.zisco-crud-plain-textarea { resize: vertical; min-height: 100px; }

/* ── Lead source grid ── */
.lead-source-grid > [class*="col-"] { max-width: 50%; flex: 0 0 50%; }
@media (max-width: 767.98px) {
    .lead-source-grid > [class*="col-"] { max-width: 100%; flex: 0 0 100%; }
}

/* ── Tags color picker ── */
.tags-color-panel {
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 12px;
    background: #f8fafc;
    padding: 1rem;
}
.tags-color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 575.98px) { .tags-color-grid { grid-template-columns: 1fr; } }
.tag-color-field input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 3px;
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.tag-color-field input[type="text"] {
    font-size: 0.8125rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.tags-list-card .zisco-tag-preview { max-width: 100%; word-break: break-word; }

/* ── Payment method page ── */
.pm-hero {
    border-radius: 24px;
    border: 1px solid var(--admin-border, #e2e8f0);
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.pm-hero-inner { position: relative; padding: 1.5rem 1.75rem; }
@media (min-width: 768px) { .pm-hero-inner { padding: 1.75rem 2rem; } }
.pm-hero-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 32%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.10), transparent 28%);
    pointer-events: none;
}
.pm-hero-layout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (min-width: 992px) {
    .pm-hero-layout {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 2rem;
    }
}
.pm-hero-main { flex: 1 1 58%; min-width: 0; }
.pm-hero-kicker {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.65rem;
}
.pm-hero-title {
    font-size: 1.625rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.65rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.pm-hero-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #64748b;
    max-width: 42rem;
    margin-bottom: 1rem;
}
.pm-hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pm-hero-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--admin-border, #e2e8f0);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
}
.pm-hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    flex: 0 0 auto;
}
@media (min-width: 992px) {
    .pm-hero-stats-grid { max-width: 420px; width: 42%; }
}
@media (min-width: 1400px) {
    .pm-hero-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; }
}
@media (max-width: 575.98px) { .pm-hero-stats-grid { grid-template-columns: 1fr; } }
.pm-stat-card {
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    padding: 1rem 1.15rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.pm-stat-card .stat-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0;
}
.pm-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: #0f172a;
    margin-top: 0.55rem;
    margin-bottom: 0.2rem;
    line-height: 1.1;
}
.pm-stat-card .stat-hint { font-size: 0.6875rem; color: #64748b; margin-bottom: 0; line-height: 1.4; }
.pm-badge-editing { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.pm-form-card, .pm-list-card {
    border-radius: 24px;
    border: 1px solid var(--admin-border, #e2e8f0);
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    height: 100%;
}
.pm-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
}
.pm-card-header h6 { font-size: 1.0625rem; font-weight: 600; color: #0f172a; }
.pm-card-body { padding: 1.5rem; }
.pm-guidance-box {
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 12px;
    background: #f8fafc;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.pm-guidance-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4338ca;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pm-method-card {
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 14px;
    background: #f8fafc;
    padding: 1.15rem 1.25rem;
    height: 100%;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.pm-method-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}
.pm-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--admin-border, #e2e8f0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 1.15rem;
}
.pm-method-id {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    border: 1px solid var(--admin-border, #e2e8f0);
    background: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}
.pm-btn-edit { font-size: 0.8125rem; border-radius: 8px; padding: 0.35rem 0.75rem; }
.pm-btn-delete { font-size: 0.8125rem; border-radius: 8px; padding: 0.35rem 0.75rem; font-weight: 500; }
.pm-list-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    border: 1px solid var(--admin-border, #e2e8f0);
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

/* ── Shared settings data tables ── */
.award-rule-page .award-rule-table thead th,
.award-program-page .award-program-table thead th,
.translations-page .tr-table thead th,
.crud-table thead th {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
}
.award-rule-page .award-rule-table tbody td,
.award-program-page .award-program-table tbody td,
.translations-page .tr-table tbody td,
.crud-table tbody td {
    font-size: 0.8125rem;
    padding: 0.85rem 1rem;
    vertical-align: middle;
}
.crud-table tbody td { padding: 12px 16px; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.crud-table tbody tr:last-child td { border-bottom: none; }
.crud-table tbody tr:hover { background: #f9fafb; }
.translations-page .tr-table tbody td { border-top: 1px solid var(--admin-border, #e2e8f0); }
.award-rule-page .award-rule-table th.col-action,
.award-rule-page .award-rule-table td.col-action,
.award-program-page .award-program-table th.col-action,
.award-program-page .award-program-table td.col-action {
    width: 110px;
    min-width: 110px;
    white-space: nowrap;
}
.award-rule-page .ar-action-group,
.award-program-page .ap-action-group,
.translations-page .tr-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

/* ── Award rule / program page headers ── */
.award-rule-page .zisco-card-header h5,
.award-program-page .zisco-card-header h5 { font-size: 1.0625rem; font-weight: 600; }
.award-rule-page .btn-new-rule,
.award-program-page .btn-new-program {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
}
.award-rule-page .btn-new-rule:hover,
.award-program-page .btn-new-program:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

/* ── Shared settings modals (award rule / program) ── */
.award-rule-modal .modal-content,
.award-program-modal .modal-content {
    border-radius: 16px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
}
.award-rule-modal .modal-dialog,
.award-program-modal .modal-dialog {
    max-height: calc(100vh - 2rem);
    margin: 1rem auto;
}
.award-program-modal .modal-dialog { max-width: 720px; }
.award-rule-modal form,
.award-program-modal form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}
.award-rule-modal .modal-header,
.award-program-modal .modal-header {
    flex-shrink: 0;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
    padding: 1rem 1.25rem;
}
.award-rule-modal .modal-title { font-size: 1rem; font-weight: 600; color: #0f172a; }
.award-rule-modal .modal-footer,
.award-program-modal .modal-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--admin-border, #e2e8f0);
    padding: 0.85rem 1.25rem;
    background: #fff;
}
.award-rule-modal .modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 11rem);
    flex: 1 1 auto;
}
.award-program-modal .modal-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    max-height: calc(100vh - 10rem);
    flex: 1 1 auto;
}

/* ── Select2 — Bootstrap 5 alignment (global) ── */

/* Hide native <select> once Select2 replaces it — Bootstrap .form-select otherwise
   keeps border, chevron, and block layout visible beside the widget. */
select.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    background: transparent none !important;
    box-shadow: none !important;
}
select.select2-hidden-accessible.is-invalid,
select.select2-hidden-accessible.form-select.is-invalid,
select.select2-hidden-accessible.erp-select.is-invalid {
    border: 0 !important;
    box-shadow: none !important;
}

.select2-container {
    width: 100% !important;
    max-width: 100%;
    border: none;
    box-shadow: none;
}
.select2-container .select2-selection--single {
    height: calc(2.25rem + 2px);
    border: 1px solid #ced4da;
    border-radius: .375rem;
    background-color: var(--admin-surface, #fff);
}
.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.25rem);
    padding-left: .75rem;
    color: #212529;
}
.select2-container .select2-selection--single .select2-selection__arrow {
    height: calc(2.25rem);
}
.form-select-sm.select2-hidden-accessible + .select2-container .select2-selection--single {
    height: calc(1.9rem + 2px);
}
.form-select-sm.select2-hidden-accessible + .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 1.9rem;
    padding-left: .65rem;
    font-size: .875rem;
}
.form-select-sm.select2-hidden-accessible + .select2-container .select2-selection--single .select2-selection__arrow {
    height: 1.9rem;
}
.select2-container .select2-selection--multiple {
    min-height: calc(2.25rem + 2px);
    border: 1px solid #ced4da;
    border-radius: .375rem;
    padding: .15rem .35rem;
    background-color: var(--admin-surface, #fff);
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e7f1ff;
    border: 1px solid #b6d4fe;
    color: #0d6efd;
    border-radius: .25rem;
    padding: 1px .45rem;
    margin-top: .25rem;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #0d6efd;
    margin-right: .35rem;
}
.dropdown-with-add {
    display: flex;
    align-items: stretch;
    gap: .375rem;
}
.dropdown-with-add > .select2-container,
.dropdown-with-add > select:not(.select2-hidden-accessible) {
    flex: 1 1 auto;
    min-width: 0;
}
.modal .select2-container--open .select2-dropdown {
    z-index: 1056;
}

.award-rule-modal .employee-search-wrap,
.award-program-modal .lookup-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
}
.award-rule-modal .employee-search-wrap .select2-container,
.award-program-modal .lookup-wrap .select2-container { flex: 1 1 auto; min-width: 0; }
.award-rule-modal .btn-employee-add,
.award-program-modal .btn-lookup-add {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    width: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
}
.award-rule-modal .btn-employee-add:hover,
.award-program-modal .btn-lookup-add:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}
.award-rule-modal .select2-container--default .select2-selection--single,
.award-program-modal .select2-container--default .select2-selection--single {
    height: calc(1.9rem + 2px);
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}
.award-rule-modal .select2-container--default .select2-selection--single .select2-selection__rendered,
.award-program-modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.9rem;
    padding-left: 0.65rem;
    font-size: 0.875rem;
}
.award-rule-modal .select2-container--default .select2-selection--single .select2-selection__arrow,
.award-program-modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 1.9rem;
}

/* ── Translations page ── */
.translations-page .tr-card {
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.translations-page .tr-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
}
.translations-page .tr-card-header h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}
.translations-page .tr-card-body { padding: 1rem 1.25rem; }
.translations-page .tr-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}
.translations-page .tr-lang-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}
.translations-page .tr-lang-link:hover { text-decoration: underline; }
.translations-page .tr-progress {
    height: 8px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}
.translations-page .tr-progress-bar { height: 100%; border-radius: 999px; }
.translations-page .tr-progress-bar.tone-danger { background: #f43f5e; }
.translations-page .tr-progress-bar.tone-warning { background: #f59e0b; }
.translations-page .tr-progress-bar.tone-primary { background: #3b82f6; }
.translations-page .tr-progress-bar.tone-success { background: #10b981; }
.translations-page .tr-progress-label { font-size: 0.6875rem; color: #64748b; margin-top: 0.25rem; }
.translations-page .tr-btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}
.translations-page .tr-breadcrumb-link { color: #e11d48; text-decoration: none; }
.translations-page .tr-breadcrumb-link:hover { text-decoration: underline; }

/* ── Award points settings ── */
.award-settings-page .award-panel {
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}
.award-settings-page .award-panel + .award-panel { margin-top: 1.25rem; }
.award-settings-page .award-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}
.award-settings-page .award-panel-body { padding: 1.25rem; }

/* ── List pagination & DataTables ── */
.settings-paginate-nav {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    justify-content: space-between;
    gap: 0.5rem;
}
.settings-paginate-nav .pagination { margin-bottom: 0; }
.settings-paginate-nav .page-link { font-size: 0.8125rem; padding: 0.35rem 0.65rem; }
.settings-paginate-info { font-size: 0.8125rem; color: #64748b; line-height: 1.5; }
.settings-datatable-wrap .dataTables_wrapper .dataTables_paginate,
.settings-datatable-wrap .dataTables_wrapper .dataTables_info,
.award-rule-page .dataTables_wrapper .dataTables_paginate,
.award-rule-page .dataTables_wrapper .dataTables_info {
    margin-top: 0 !important;
    padding-top: 0 !important;
    font-size: 0.8125rem;
    color: #64748b;
}
.settings-datatable-wrap .dataTables_wrapper .dataTables_length,
.settings-datatable-wrap .dataTables_wrapper .dataTables_filter {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.pm-btn-update,
.award-settings-page .btn-save-award {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 1.15rem;
}

/* ── Shared horizontal section tabs (clients show / settings lead masters) ── */
.ctab-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border: 1px solid #e9eef5;
    border-radius: 12px;
    padding: 6px;
    background: #fff;
}
.ctab-nav a {
    white-space: nowrap;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    transition: background .15s ease, color .15s ease;
}
.ctab-nav a:hover {
    background: #f8fafc;
    color: #0f172a;
}
.ctab-nav a.active {
    background: #0f172a;
    color: #fff;
}
.ctab-nav a.active:hover {
    background: #0f172a;
    color: #fff;
}
.ctab-nav a .badge {
    font-size: 11px;
}

/* Transactions form field validation */
.erp-field-error,
.tx-field-error {
    display: block;
    margin-top: .35rem;
    font-size: 12px;
    font-weight: 600;
    color: #dc2626;
}
.erp-input.is-invalid,
.erp-select.is-invalid,
.erp-textarea.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .15) !important;
}
.select2-container.is-invalid .select2-selection--single,
.select2-container.is-invalid .select2-selection--multiple,
.erp-select.is-invalid + .select2-container .select2-selection--single,
.erp-select.is-invalid + .select2-container .select2-selection--multiple {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .15) !important;
}

/* Zisco-style tags input (tw-tags) */
.tw-tags-wrapper {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: .65rem;
    background: #fff;
    cursor: text;
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tw-tags-wrapper:focus-within {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
input.tw-tags.is-invalid + .tw-tags-wrapper {
    border-color: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, .15) !important;
}
.tw-tags-input {
    flex: 1 1 120px;
    min-width: 120px;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    padding: 4px 2px;
    font-size: 13px;
    color: #111827;
    line-height: 1.4;
}
.tw-tags-input::placeholder {
    color: #9ca3af;
}
.tw-tags-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    animation: twTagsFadeIn 140ms ease;
}
.tw-tags-item.no-anim {
    animation: none;
}
.tw-tags-item > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tw-tags-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #60a5fa;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}
.tw-tags-remove:hover {
    background: #dbeafe;
    color: #1e40af;
}
.tw-tags-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    max-height: 220px;
    overflow: auto;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .35);
}
.tw-tags-menu.is-hidden {
    display: none !important;
}
.tw-tags-suggestion {
    display: block;
    width: 100%;
    border: 0;
    border-radius: .45rem;
    background: transparent;
    padding: .45rem .65rem;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}
.tw-tags-suggestion:hover {
    background: #f3f4f6;
}
@keyframes twTagsFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

