:root {
  --sidebar-width: 280px;
  --sidebar-mini-width: 84px;
  --admin-bg: #f8fafc;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f1f5f9;
  --admin-border: #e2e8f0;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-primary: #2563eb;
  --admin-primary-dark: #1d4ed8;
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-sidebar: #0f172a;
  --admin-sidebar-soft: #1e293b;
  --admin-shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.04);
  --admin-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.07);
  --admin-shadow-lg: 0 20px 50px -10px rgba(15, 23, 42, 0.12);
  --admin-ring: 0 0 0 4px rgba(37, 99, 235, 0.14);
  --font-gujarati: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f8fafc;
  color: var(--admin-text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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-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: 46px;
  padding: 0.7rem 0.95rem;
  border-radius: 10px;
  color: #94a3b8;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  font-weight: 700;
}

.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;
  z-index: 1030;
  display: none;
  background: rgba(15, 23, 42, 0.5);
}

.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: 120px;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.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: 96px;
  border-bottom: 1px solid var(--admin-border);
}

.profile-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  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: 96px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
}

.auth-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  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 {
  padding: 1.1rem 0 1.35rem;
  color: var(--admin-muted);
  font-size: 0.9rem;
}

.admin-footer .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@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,
  body.sidebar-mini .sidebar-nav div[style*="text-uppercase"],
  body.sidebar-mini .sidebar-nav div[class*="text-uppercase"],
  body.sidebar-mini .sidebar-nav .badge,
  body.sidebar-mini .px-3.my-2 a .nav-text {
    display: none !important;
    width: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  body.sidebar-mini .px-3.my-2 {
    padding-inline: 0.5rem !important;
  }

  body.sidebar-mini .px-3.my-2 a {
    justify-content: center !important;
    padding-inline: 0 !important;
    text-align: center;
  }

  body.sidebar-mini .px-3.my-2 a span {
    margin-right: 0 !important;
  }

  body.sidebar-mini .sidebar-header {
    margin-inline: 0.5rem;
    padding-inline: 0;
    justify-content: center;
  }

  body.sidebar-mini .sidebar-header .brand-mark {
    justify-content: center;
    gap: 0 !important;
  }

  body.sidebar-mini .sidebar-header .brand-mark img {
    margin-right: 0 !important;
  }

  body.sidebar-mini .sidebar-nav .nav-link {
    justify-content: center !important;
    padding-inline: 0.5rem !important;
    text-align: center;
  }

  body.sidebar-mini .sidebar-nav .nav-link .nav-icon {
    margin-right: 0 !important;
  }

  body.sidebar-mini .sidebar-nav .nav-link .nav-icon i {
    margin-right: 0 !important;
  }

  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));
    transform: translateX(-100%);
  }

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

  body.sidebar-open {
    overflow: hidden;
  }

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

  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;
}

.theme-toggle i {
  font-size: 1rem;
}

.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);
}

.auth-theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.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);
}

.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"]),
html[data-theme="dark"] {
  --admin-sidebar: #082f2c;
  --admin-sidebar-soft: rgba(255, 255, 255, 0.08);
  --admin-sidebar-border: rgba(255, 255, 255, 0.1);
  --admin-sidebar-text: #94a3b8;
  --admin-sidebar-text-strong: #ffffff;
  --admin-sidebar-muted: #64748b;
  --admin-sidebar-icon-bg: rgba(255, 255, 255, 0.08);
  --admin-sidebar-icon: #2dd4bf;
  --admin-sidebar-shadow: 18px 0 42px rgba(8, 47, 44, 0.35);
}

.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: #94a3b8;
}

.sidebar-nav .nav-link {
  color: #94a3b8;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #2dd4bf;
}

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

/* ==========================================================================
   Strict Avatar Circle Rules (Prevents Oval Distortion)
   ========================================================================== */
.avatar-circle,
.avatar-img,
.profile-avatar,
.sidebar-user-avatar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  border-radius: 50% !important;
}

/* ==========================================================================
   Mobile Responsive Enhancements (Top Bar & Tables)
   ========================================================================== */
@media (max-width: 767.98px) {
  .navbar-actions {
    gap: 0.35rem !important;
  }
  
  .profile-button {
    padding: 0.25rem 0.4rem !important;
  }

  .content-header, .page-heading {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.85rem !important;
  }

  .content-header > div:last-child,
  .heading-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .table-mobile-cards thead {
    display: none !important;
  }
  .table-mobile-cards tbody {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 0.25rem;
  }
  .table-mobile-cards tbody tr {
    display: flex;
    flex-direction: column;
    background: var(--admin-surface, #ffffff);
    border: 1px solid var(--admin-border, #dbe4ef);
    border-radius: 1rem;
    padding: 1.15rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .table-mobile-cards tbody tr:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  }
  .table-mobile-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0 !important;
    border-bottom: 1px dashed var(--admin-border, #dbe4ef) !important;
    text-align: right;
    width: 100% !important;
  }
  .table-mobile-cards tbody td:last-child {
    border-bottom: none !important;
    padding-top: 0.85rem !important;
    justify-content: flex-end;
    gap: 0.5rem;
  }
  .table-mobile-cards tbody td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.785rem;
    color: var(--admin-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    margin-right: 1rem;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Ultra-Premium Modern UI Polish Rules (Global Typography, Cards, Buttons, Inputs)
   ========================================================================== */

/* Cards */
.card {
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card-hover:hover,
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.09) !important;
}

.card-header {
  border-bottom: 1px solid #e2e8f0 !important;
  border-top-left-radius: 16px !important;
  border-top-right-radius: 16px !important;
  padding: 1.15rem 1.5rem !important;
}

.card-body {
  padding: 1.5rem !important;
}

/* Form Controls & Inputs */
.form-control, 
.form-select {
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  padding: 0.65rem 0.95rem !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  color: #0f172a !important;
  background-color: #ffffff !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.form-control:focus, 
.form-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14) !important;
  outline: none !important;
}

.input-group-text {
  border-radius: 10px !important;
  border-color: #cbd5e1 !important;
  font-weight: 600 !important;
}

/* Buttons */
.btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
  padding: 0.625rem 1.25rem !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.38) !important;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28) !important;
}

.btn-success:hover,
.btn-success:focus {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.38) !important;
}

.btn-outline-primary {
  border-color: #3b82f6 !important;
  color: #2563eb !important;
}

.btn-outline-primary:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25) !important;
}

/* Badges */
.badge {
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  padding: 0.45em 0.85em !important;
  border-radius: 50rem !important;
  font-size: 0.78rem !important;
}

.bg-primary-subtle {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

.bg-success-subtle {
  background-color: #ecfdf5 !important;
  color: #047857 !important;
}

.bg-warning-subtle {
  background-color: #fffbeb !important;
  color: #b45309 !important;
}

.bg-danger-subtle {
  background-color: #fef2f2 !important;
  color: #b91c1c !important;
}

.bg-info-subtle {
  background-color: #f0f9ff !important;
  color: #0369a1 !important;
}

/* Tables */
.table {
  color: #0f172a !important;
}

.table th {
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  color: #475569 !important;
  font-size: 0.8rem !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

/* ==========================================================================
   Ultra-Premium High-Contrast Light Mode Polish (Sidebar, Typography, Badges, Metrics)
   ========================================================================== */

/* 1. Sidebar Nav High-Contrast Rules (Dark Teal Theme) */
.sidebar-nav .nav-link {
  color: #94a3b8 !important;
  font-weight: 500 !important;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link.active:hover,
.sidebar-nav .nav-link.active:focus {
  background: linear-gradient(135deg, #0d9488 0%, #059669 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4) !important;
  font-weight: 700 !important;
}

.sidebar-nav .nav-link.active .nav-icon {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.sidebar-nav .nav-link.active .nav-text,
.sidebar-nav .nav-link.active i,
.sidebar-nav .nav-link.active * {
  color: #ffffff !important;
}

.nav-icon {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #2dd4bf !important;
}

.sidebar-category-title {
  color: #64748b !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

/* Hero Campaign / Overview Accent Banner (Matching Reference Image) */
.hero-campaign-card {
  background: linear-gradient(135deg, #064e3b 0%, #0d9488 100%) !important;
  color: #ffffff !important;
  border-radius: 20px !important;
  padding: 1.75rem 1.85rem !important;
  box-shadow: 0 14px 35px -8px rgba(6, 78, 59, 0.4) !important;
  position: relative !important;
  overflow: hidden !important;
}

.hero-campaign-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* 2. Metric Cards High-Contrast Rules */
.metric-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 1.35rem 1.5rem !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.metric-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px -5px rgba(15, 23, 42, 0.1) !important;
}

.metric-card.metric-primary {
  border-left: 4px solid #4f46e5 !important;
}

.metric-card.metric-success {
  border-left: 4px solid #059669 !important;
}

.metric-card.metric-warning {
  border-left: 4px solid #d97706 !important;
}

.metric-card.metric-danger {
  border-left: 4px solid #dc2626 !important;
}

.metric-label {
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.metric-value {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 2.15rem !important;
  line-height: 1.2 !important;
  margin-top: 0.35rem !important;
  margin-bottom: 0.35rem !important;
}

.metric-meta {
  color: #64748b !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

.metric-meta .text-warning {
  color: #b45309 !important;
  font-weight: 700 !important;
}

.metric-meta .text-success {
  color: #047857 !important;
  font-weight: 700 !important;
}

.metric-meta .text-danger {
  color: #b91c1c !important;
  font-weight: 700 !important;
}

/* 3. Eyebrows & Typography */
.eyebrow {
  color: #4f46e5 !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  font-size: 0.76rem !important;
}

.h3, h3 {
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* 4. Table Header & High Contrast Cells */
.table thead th {
  background-color: #f8fafc !important;
  color: #334155 !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 0.85rem 1rem !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.table tbody td {
  padding: 0.95rem 1rem !important;
  color: #0f172a !important;
  font-weight: 500 !important;
}

/* 5. Custom High Contrast Badges */
.badge-branch {
  background-color: #e0e7ff !important;
  color: #3730a3 !important;
  border: 1px solid #c7d2fe !important;
  font-weight: 700 !important;
}

.badge-share {
  background-color: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   MOBILE SIDEBAR TOGGLE & RESPONSIVE FIXES
   ========================================================================== */
@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 1045 !important;
    width: 280px !important;
    max-width: 85vw !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25) !important;
  }

  body.sidebar-open .admin-sidebar,
  .admin-sidebar.show,
  .admin-sidebar.active {
    transform: translateX(0) !important;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
  }

  body.sidebar-open .sidebar-backdrop,
  .sidebar-backdrop.show,
  .sidebar-backdrop.active {
    display: block !important;
  }

  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   SUPER-SLEEK RESPONSIVE TABLE & MOBILE CARD DESIGN SYSTEM
   ========================================================================== */

/* 1. Ensure Table Container Scrolls Smoothly & Never Clips Content */
.table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 12px;
  max-width: 100%;
}

/* 2. Compact 2-Line Cell Formatting & Icon-based Enhancements */
.table th, .table td {
  vertical-align: middle !important;
  font-size: 0.85rem !important;
  padding: 0.75rem 0.75rem !important;
}

/* 3. Prevent Action Buttons from Breaking/Squishing into Vertical Text (e.g. E d i t) */
.table .btn,
.table .btn-group,
.table td.text-end,
.table th.text-end,
.btn-nowrap,
.edit-branch-btn,
.delete-branch-btn,
.edit-partner-btn,
.delete-partner-btn,
.edit-agent-btn,
.delete-agent-btn,
.edit-service-btn,
.delete-service-btn {
  white-space: nowrap !important;
  word-break: normal !important;
}

.table .cell-2line {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.table .cell-main {
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.table .cell-sub {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Icon-based compact action buttons */
.btn-group-icon .btn {
  padding: 0.35rem 0.6rem !important;
  font-size: 0.85rem !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
}

/* 4. Automatic Mobile Card View Transformer (< 768px) */
@media (max-width: 767.98px) {
  .table-responsive {
    overflow-x: visible !important;
    background: transparent !important;
    border: none !important;
  }

  table.table,
  .table-mobile-cards,
  .table-responsive > table {
    table-layout: auto !important;
    width: 100% !important;
    display: block !important;
  }

  table.table thead,
  .table-mobile-cards thead {
    display: none !important; /* Hide standard headers on mobile */
  }

  table.table tbody,
  .table-mobile-cards tbody,
  table.table tbody tr,
  .table-mobile-cards tbody tr {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: auto !important;
  }

  table.table tbody tr,
  .table-mobile-cards tbody tr {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    margin-bottom: 1rem !important;
    padding: 0.85rem 1rem !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
    position: relative !important;
    overflow: hidden !important;
  }

  table.table tbody tr:hover,
  .table-mobile-cards tbody tr:hover {
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1) !important;
  }

  table.table tbody td,
  .table-mobile-cards tbody td {
    display: block !important;
    width: 100% !important;
    padding: 0.55rem 0 !important;
    border: none !important;
    border-bottom: 1px dashed #e2e8f0 !important;
    text-align: left !important;
    font-size: 0.88rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    white-space: normal !important;
  }

  table.table tbody td:last-child,
  .table-mobile-cards tbody td:last-child {
    border-bottom: none !important;
    padding-top: 0.65rem !important;
    margin-top: 0.15rem !important;
  }

  table.table tbody td[data-label]::before,
  .table-mobile-cards tbody td[data-label]::before {
    content: attr(data-label);
    display: block !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    color: #64748b !important;
    letter-spacing: 0.05em !important;
    text-align: left !important;
    margin-bottom: 0.35rem !important;
    width: 100% !important;
  }

  /* Make inner containers fit 100% inside mobile card cells */
  .table-mobile-cards td > div {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Compact action bar on mobile card footer */
  .table-mobile-cards td .btn-group {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 0.4rem !important;
    flex-wrap: wrap !important;
  }

  .form-control, .form-select, .btn {
    font-size: 0.88rem !important;
  }

  .modal-dialog {
    margin: 0.5rem !important;
  }

  .admin-content {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }
}

/* ==========================================================================
   COMPREHENSIVE DARK MODE OVERRIDES (Fix for bg-white, text-dark, tables, etc.)
   ========================================================================== */
html[data-theme="dark"],
html[data-bs-theme="dark"] {
  color-scheme: dark !important;
  --bs-body-bg: #0f172a !important;
  --bs-body-color: #f8fafc !important;
  --bs-emphasis-color: #ffffff !important;
  --bs-secondary-color: #94a3b8 !important;
  --bs-secondary-bg: #1e293b !important;
  --bs-tertiary-bg: #0f172a !important;
  --bs-border-color: #334155 !important;
  --admin-bg: #0f172a !important;
  --admin-surface: #1e293b !important;
  --admin-surface-soft: #0f172a !important;
  --admin-border: #334155 !important;
  --admin-text: #f8fafc !important;
  --admin-muted: #94a3b8 !important;
}

html[data-theme="dark"] body,
html[data-bs-theme="dark"] body,
html[data-theme="dark"] .admin-shell,
html[data-bs-theme="dark"] .admin-shell,
html[data-theme="dark"] .admin-main,
html[data-bs-theme="dark"] .admin-main,
html[data-theme="dark"] .admin-content,
html[data-bs-theme="dark"] .admin-content,
html[data-theme="dark"] .dashboard-content,
html[data-bs-theme="dark"] .dashboard-content {
  background-color: #0f172a !important;
  background: #0f172a !important;
  color: #f8fafc !important;
}

/* Dark mode for all cards, panels, modals, dropdowns, offcanvas */
html[data-theme="dark"] .card,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-body,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .offcanvas,
html[data-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-body,
html[data-bs-theme="dark"] .panel,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .offcanvas,
html[data-bs-theme="dark"] .dropdown-menu {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

/* Dark mode for inline white card & element backgrounds */
html[data-theme="dark"] [style*="background: linear-gradient(145deg, #ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background-color: #ffffff"],
html[data-theme="dark"] [style*="background-color:#ffffff"],
html[data-theme="dark"] [style*="background-color: #fff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: white"],
html[data-bs-theme="dark"] [style*="background: linear-gradient(145deg, #ffffff"],
html[data-bs-theme="dark"] [style*="background: #ffffff"],
html[data-bs-theme="dark"] [style*="background:#ffffff"],
html[data-bs-theme="dark"] [style*="background: #fff"],
html[data-bs-theme="dark"] [style*="background:#fff"],
html[data-bs-theme="dark"] [style*="background: white"],
html[data-bs-theme="dark"] [style*="background-color: #ffffff"],
html[data-bs-theme="dark"] [style*="background-color:#ffffff"],
html[data-bs-theme="dark"] [style*="background-color: #fff"],
html[data-bs-theme="dark"] [style*="background-color:#fff"],
html[data-bs-theme="dark"] [style*="background-color: white"] {
  background: #1e293b !important;
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

/* Dark mode for inline white table/box containers */
html[data-theme="dark"] [style*="background: #f8fafc"],
html[data-theme="dark"] [style*="background-color: #f8fafc"],
html[data-bs-theme="dark"] [style*="background: #f8fafc"],
html[data-bs-theme="dark"] [style*="background-color: #f8fafc"] {
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #f8fafc !important;
}

/* Dark mode for inline dark text styles */
html[data-theme="dark"] [style*="color: #0f172a"],
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color: #1e293b"],
html[data-theme="dark"] [style*="color:#1e293b"],
html[data-theme="dark"] [style*="color: #334155"],
html[data-theme="dark"] [style*="color:#334155"],
html[data-theme="dark"] [style*="color: #000"],
html[data-theme="dark"] [style*="color:#000"],
html[data-theme="dark"] [style*="color: black"],
html[data-bs-theme="dark"] [style*="color: #0f172a"],
html[data-bs-theme="dark"] [style*="color:#0f172a"],
html[data-bs-theme="dark"] [style*="color: #1e293b"],
html[data-bs-theme="dark"] [style*="color:#1e293b"],
html[data-bs-theme="dark"] [style*="color: #334155"],
html[data-bs-theme="dark"] [style*="color:#334155"],
html[data-bs-theme="dark"] [style*="color: #000"],
html[data-bs-theme="dark"] [style*="color:#000"],
html[data-bs-theme="dark"] [style*="color: black"] {
  color: #f8fafc !important;
}

/* Dark mode for light backgrounds & table-light header strips (White Line text: BOLD & BLACK) */
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-light-subtle,
html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .bg-light-subtle {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Explicit rule for Table Light Headers / White Line Header Strips in Dark & Light Mode: BOLD and PURE BLACK text */
.table-light,
thead.table-light,
tfoot.table-light,
tr.table-light,
.table-light th,
.table-light td,
thead.table-light th,
thead.table-light td,
thead.bg-light,
tr.bg-light,
th.bg-light,
html[data-theme="dark"] .table-light,
html[data-theme="dark"] thead.table-light,
html[data-theme="dark"] tfoot.table-light,
html[data-theme="dark"] tr.table-light,
html[data-theme="dark"] .table-light th,
html[data-theme="dark"] .table-light td,
html[data-theme="dark"] thead.table-light th,
html[data-theme="dark"] thead.table-light td,
html[data-theme="dark"] thead.bg-light,
html[data-theme="dark"] tr.bg-light,
html[data-theme="dark"] th.bg-light,
html[data-theme="dark"] .table-light *,
html[data-theme="dark"] thead.table-light *,
html[data-bs-theme="dark"] .table-light,
html[data-bs-theme="dark"] thead.table-light,
html[data-bs-theme="dark"] tfoot.table-light,
html[data-bs-theme="dark"] tr.table-light,
html[data-bs-theme="dark"] .table-light th,
html[data-bs-theme="dark"] .table-light td,
html[data-bs-theme="dark"] thead.table-light th,
html[data-bs-theme="dark"] thead.table-light td,
html[data-bs-theme="dark"] thead.bg-light,
html[data-bs-theme="dark"] tr.bg-light,
html[data-bs-theme="dark"] th.bg-light,
html[data-bs-theme="dark"] .table-light *,
html[data-bs-theme="dark"] thead.table-light * {
  background-color: #f8fafc !important;
  color: #000000 !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  opacity: 1 !important;
}

/* Card Headers & Footers */
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer,
html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* Headings & Text Colors */
html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-bs-theme="dark"] .text-dark,
html[data-bs-theme="dark"] .text-body,
html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6 {
  color: #f8fafc !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-secondary,
html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-secondary {
  color: #94a3b8 !important;
}

/* Form Inputs, Selects, Options & Textareas */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] textarea,
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .input-group-text,
html[data-bs-theme="dark"] textarea {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] select option,
html[data-bs-theme="dark"] select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-bs-theme="dark"] .form-control::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .form-label,
html[data-bs-theme="dark"] .form-label {
  color: #e2e8f0 !important;
}

/* Tables */
html[data-theme="dark"] .table,
html[data-bs-theme="dark"] .table {
  color: #f8fafc !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td,
html[data-bs-theme="dark"] .table th,
html[data-bs-theme="dark"] .table td {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #162032 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .table-hover tbody tr:hover,
html[data-theme="dark"] .table-hover tbody tr:hover > *,
html[data-bs-theme="dark"] .table-hover tbody tr:hover,
html[data-bs-theme="dark"] .table-hover tbody tr:hover > * {
  background-color: rgba(51, 65, 85, 0.7) !important;
  color: #ffffff !important;
}

/* Navbar & Controls */
html[data-theme="dark"] .admin-navbar,
html[data-theme="dark"] .live-clock-badge,
html[data-theme="dark"] #langDropdownAdmin,
html[data-theme="dark"] [data-theme-toggle],
html[data-bs-theme="dark"] .admin-navbar,
html[data-bs-theme="dark"] .live-clock-badge,
html[data-bs-theme="dark"] #langDropdownAdmin,
html[data-bs-theme="dark"] [data-theme-toggle] {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

/* Modals & Dialogs */
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer,
html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer {
  border-color: #334155 !important;
}

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

/* Dropdown Menu Items */
html[data-theme="dark"] .dropdown-item,
html[data-bs-theme="dark"] .dropdown-item {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus,
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: #334155 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .dropdown-divider,
html[data-bs-theme="dark"] .dropdown-divider {
  border-color: #334155 !important;
}

/* Badges & Subtly Colored Badges in Dark Mode */
html[data-theme="dark"] .badge.bg-light,
html[data-bs-theme="dark"] .badge.bg-light,
html[data-theme="dark"] .badge.bg-white,
html[data-bs-theme="dark"] .badge.bg-white {
  background-color: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

html[data-theme="dark"] .bg-primary-subtle, html[data-bs-theme="dark"] .bg-primary-subtle { background-color: rgba(37, 99, 235, 0.25) !important; color: #93c5fd !important; }
html[data-theme="dark"] .bg-success-subtle, html[data-bs-theme="dark"] .bg-success-subtle { background-color: rgba(16, 185, 129, 0.25) !important; color: #6ee7b7 !important; }
html[data-theme="dark"] .bg-warning-subtle, html[data-bs-theme="dark"] .bg-warning-subtle { background-color: rgba(245, 158, 11, 0.25) !important; color: #fde047 !important; }
html[data-theme="dark"] .bg-danger-subtle, html[data-bs-theme="dark"] .bg-danger-subtle { background-color: rgba(239, 68, 68, 0.25) !important; color: #fca5a5 !important; }
html[data-theme="dark"] .bg-info-subtle, html[data-bs-theme="dark"] .bg-info-subtle { background-color: rgba(14, 165, 233, 0.25) !important; color: #7dd3fc !important; }
html[data-theme="dark"] .bg-secondary-subtle, html[data-bs-theme="dark"] .bg-secondary-subtle { background-color: rgba(100, 116, 139, 0.25) !important; color: #cbd5e1 !important; }

/* Buttons in Dark Mode */
html[data-theme="dark"] .btn-light,
html[data-bs-theme="dark"] .btn-light {
  background-color: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

html[data-theme="dark"] .btn-outline-secondary,
html[data-bs-theme="dark"] .btn-outline-secondary {
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
}

/* Pagination */
html[data-theme="dark"] .page-link,
html[data-bs-theme="dark"] .page-link {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .page-item.active .page-link,
html[data-bs-theme="dark"] .page-item.active .page-link {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

/* Nav Tabs & Accordion */
html[data-theme="dark"] .nav-tabs,
html[data-bs-theme="dark"] .nav-tabs {
  border-bottom-color: #334155 !important;
}

html[data-theme="dark"] .nav-tabs .nav-link,
html[data-bs-theme="dark"] .nav-tabs .nav-link {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .nav-tabs .nav-link.active,
html[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  background-color: #1e293b !important;
  color: #60a5fa !important;
  border-color: #334155 #334155 #1e293b !important;
}

html[data-theme="dark"] .accordion-button,
html[data-bs-theme="dark"] .accordion-button {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .accordion-button:not(.collapsed),
html[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  background-color: #334155 !important;
  color: #60a5fa !important;
}

html[data-theme="dark"] .accordion-item,
html[data-bs-theme="dark"] .accordion-item {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

/* ==========================================
   VISHVA AUTO ADVISOR - ULTRA PREMIUM DESIGN SYSTEM
   Akhand Gujarati Typography & WOW Aesthetics
   ========================================== */

body, button, input, select, textarea, .font-gujarati {
  font-family: 'AkhandGujarati', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

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

/* Brand Logo Image Styling */
.vishwa-logo-img {
  height: 52px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.15));
  transition: transform 0.3s ease;
}
.vishwa-logo-img:hover {
  transform: scale(1.03);
}

.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(37, 99, 235, 0.15);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(12px);
}

/* Glassmorphism Cards & Surfaces */
.glass-card {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.glass-card:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow: 0 30px 60px -12px rgba(37, 99, 235, 0.15) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}

/* Section Margins & Spacing */
.section-spacious {
  padding: 95px 0 !important;
}
.section-header-spacing {
  margin-bottom: 52px !important;
}

/* Gradient Highlights & Badges */
.text-primary-gradient {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-pill-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: 600;
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.35);
  transition: all 0.3s ease;
}
.btn-pill-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -4px rgba(37, 99, 235, 0.5);
  color: #ffffff !important;
}

/* Floating Sticky Contact Bar */
.fixed-floating-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1090;
}
.float-circle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.float-circle-btn:hover {
  transform: scale(1.12);
}
.float-wa {
  background: #25d366;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}
.float-call {
  background: #2563eb;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* ==========================================
   VISHVA AUTO ADVISOR - ULTRA CLEAN VISITOR DESIGN
   Default Clean Fonts, Floating Capsule Navbar & Dual Branch Layout
   ========================================== */

body, button, input, select, textarea, .font-gujarati {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Floating Capsule Navbar */
.rto-navbar-capsule-wrap {
  position: sticky;
  top: 12px;
  z-index: 1050;
  padding: 0 15px;
}

.rto-navbar-capsule {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: 50px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08) !important;
  padding: 10px 24px !important;
  max-width: 1280px;
  margin: 0 auto;
}

/* Branch Cards Styling */
.branch-card {
  background: #131f37;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
  height: 100%;
}

.branch-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.branch-card-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Service Photo Card Grid & Image Fix */
.service-photo-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.service-photo-card:hover {
  transform: translateY(-8px) !important;
  border-color: #93c5fd !important;
  box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15) !important;
}

.service-photo-wrap {
  position: relative !important;
  width: 100% !important;
  height: 210px !important;
  min-height: 210px !important;
  max-height: 210px !important;
  overflow: hidden !important;
  background: #f1f5f9 !important;
  flex-shrink: 0 !important;
}

.service-photo-wrap img {
  width: 100% !important;
  height: 210px !important;
  min-height: 210px !important;
  max-height: 210px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.5s ease !important;
}

.service-photo-card:hover .service-photo-wrap img {
  transform: scale(1.08) !important;
}

.service-time-tag {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  padding: 4px 12px !important;
  border-radius: 50px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(4px) !important;
  z-index: 5 !important;
}

/* Floating Capsule Navbar */
.rto-navbar-capsule-wrap {
  position: sticky;
  top: 12px;
  z-index: 1050;
  padding: 0 16px;
  margin-bottom: 15px;
}

.rto-navbar-capsule {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 50px !important;
  padding: 6px 20px !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.1) !important;
  transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
  .rto-navbar-capsule-wrap {
    top: 6px;
    padding: 0 8px;
  }
  .rto-navbar-capsule {
    border-radius: 20px !important;
    padding: 6px 14px !important;
  }
  .rto-navbar-capsule .navbar-collapse {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  }
}

/* Modern Light Grey & Charcoal Theme with Dark Red + Orange Highlights */
:root {
  --primary-red: #dc2626;
  --primary-red-hover: #b91c1c;
  --primary-red-dark: #991b1b;
  --primary-red-light: #fef2f2;
  --primary-red-border: #fca5a5;
  --primary-red-gradient: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  --primary-red-glow: rgba(220, 38, 38, 0.28);
  
  --accent-orange: #ea580c;
  --accent-orange-hover: #c2410c;
  --accent-orange-light: #fff7ed;
  --accent-orange-border: #ffedd5;
  --accent-orange-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  
  --bg-light-grey: #f8fafc;
  --bg-subtle-grey: #f1f5f9;
  --text-black: #0f172a;
  --text-dark-slate: #1e293b;
  --text-muted-grey: #64748b;
}

/* Headings — only on light content areas (use .text-dark or inline style for specific control) */

/* Primary Dark Red Buttons */
.btn-primary, .btn-pill-primary {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.25) !important;
}

.btn-primary:hover, .btn-pill-primary:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%) !important;
  border-color: #b91c1c !important;
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4) !important;
}

/* Orange Accent Buttons for Special Highlights */
.btn-orange-accent {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border-color: #ea580c !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(234, 88, 12, 0.28) !important;
  border-radius: 50px;
  font-weight: 700;
}

.btn-orange-accent:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4) !important;
  color: #ffffff !important;
}

.btn-outline-primary {
  color: #dc2626 !important;
  border-color: #dc2626 !important;
}

.btn-outline-primary:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

.text-primary, .text-primary-gradient {
  color: #dc2626 !important;
}

.text-orange-accent {
  color: #ea580c !important;
}

.bg-primary {
  background-color: #dc2626 !important;
}

.bg-primary.bg-opacity-10 {
  background-color: rgba(220, 38, 38, 0.1) !important;
}

.border-primary {
  border-color: #dc2626 !important;
}

/* Orange Highlight Badges */
.badge-orange-highlight {
  background: #fff7ed !important;
  color: #ea580c !important;
  border: 1px solid #ffedd5 !important;
  font-weight: 700;
  border-radius: 50px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
}

.badge-dark-red {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 700;
  border-radius: 50px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
}

/* Service Card Light Grey & Spacing Fixes */
.service-photo-card {
  border-radius: 20px !important;
  border: 1px solid #e2e8f0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
  transition: all 0.3s ease !important;
}

.service-photo-card:hover {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1) !important;
  transform: translateY(-4px) !important;
}

.service-card-body {
  padding: 1.35rem 1.35rem 1.5rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  flex-grow: 1 !important;
}

.service-feature-tag {
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-bottom: 6px !important;
}

.service-time-tag {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
}

/* ── Universal Badge Color System (Light Backgrounds + Dark Black Text) ── */
.badge,
.admin-badge-soft,
.badge-branch {
  font-weight: 700 !important;
  color: #000000 !important;
}

.admin-badge-dark {
  background-color: #0f172a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 0.3rem 0.75rem !important;
  border-radius: 50px !important;
  display: inline-block !important;
}

.badge.bg-danger,
.badge.bg-danger-subtle,
.badge.text-bg-danger,
.badge-danger,
.bg-danger-subtle,
.badge-dark-red,
.section-badge-red {
  background-color: #fee2e2 !important;
  color: #000000 !important;
  border: 1px solid #fca5a5 !important;
}

.badge.bg-success,
.badge.bg-success-subtle,
.badge.text-bg-success,
.badge-success,
.bg-success-subtle {
  background-color: #dcfce7 !important;
  color: #000000 !important;
  border: 1px solid #86efac !important;
}

.badge.bg-warning,
.badge.bg-warning-subtle,
.badge.text-bg-warning,
.badge-warning,
.bg-warning-subtle,
.badge-orange-highlight,
.section-badge-orange {
  background-color: #fef3c7 !important;
  color: #000000 !important;
  border: 1px solid #fde68a !important;
}

.badge.bg-primary,
.badge.bg-primary-subtle,
.badge.bg-info,
.badge.bg-info-subtle,
.badge.text-bg-primary,
.badge.text-bg-info {
  background-color: #dbeafe !important;
  color: #000000 !important;
  border: 1px solid #93c5fd !important;
}

.badge.bg-light,
.badge.bg-white,
.badge.text-bg-light,
.section-badge-light {
  background-color: #f8fafc !important;
  color: #000000 !important;
  border: 1px solid #cbd5e1 !important;
}

.badge.bg-dark,
.badge.bg-secondary,
.badge.text-bg-dark,
.badge.text-bg-secondary,
.badge.bg-slate-900,
.badge-branch-main,
.badge-branch-secondary {
  background-color: #e2e8f0 !important;
  color: #000000 !important;
  border: 1px solid #94a3b8 !important;
}

.badge.bg-purple-subtle {
  background-color: #f3e8ff !important;
  color: #000000 !important;
  border: 1px solid #d8b4fe !important;
}

/* Ensure text inside ALL badges is dark black */
.badge.text-white,
.badge.text-danger,
.badge.text-success,
.badge.text-warning,
.badge.text-info,
.badge.text-primary,
.badge.text-secondary,
.badge.text-dark,
.badge.text-muted {
  color: #000000 !important;
}

/* ── 2-Row Per Record Table Layout Styles (No Horizontal Scrollbar Overflow) ── */
.table-2row-container {
  overflow-x: hidden !important;
}

.table-2row-record-primary {
  background-color: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}

.table-2row-record-secondary {
  background-color: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
  font-size: 0.88rem;
}

.table-2row-record-secondary td {
  padding-top: 0.35rem !important;
  padding-bottom: 0.65rem !important;
  color: #475569 !important;
}

/* ── Universal Icon Container Clean Theme Overrides ── */
.p-1.bg-primary, .p-1.5.bg-primary, .p-2.bg-primary, .p-3.bg-primary,
.p-1.bg-danger, .p-1.5.bg-danger, .p-2.bg-danger, .p-3.bg-danger,
.p-1.bg-warning, .p-1.5.bg-warning, .p-2.bg-warning, .p-3.bg-warning,
.p-1.bg-dark, .p-1.5.bg-dark, .p-2.bg-dark, .p-3.bg-dark,
.avatar-circle.bg-primary, .avatar-circle.bg-danger, .avatar-circle.bg-dark {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

.p-1.bg-primary i, .p-1.5.bg-primary i, .p-2.bg-primary i, .p-3.bg-primary i,
.p-1.bg-danger i, .p-1.5.bg-danger i, .p-2.bg-danger i, .p-3.bg-danger i,
.p-1.bg-warning i, .p-1.5.bg-warning i, .p-2.bg-warning i, .p-3.bg-warning i,
.p-1.bg-dark i, .p-1.5.bg-dark i, .p-2.bg-dark i, .p-3.bg-dark i,
.avatar-circle.bg-primary i, .avatar-circle.bg-danger i, .avatar-circle.bg-dark i {
  color: #0f172a !important;
}

/* ── Mobile Horizontal Scroll & Tab Overflow Protection ── */
.mobile-horizontal-scroll,
.mobile-tab-scroll {
  display: flex !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mobile-horizontal-scroll::-webkit-scrollbar,
.mobile-tab-scroll::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.mobile-horizontal-scroll .btn,
.mobile-horizontal-scroll .badge,
.mobile-tab-scroll .btn,
.mobile-tab-scroll .badge {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

@media (max-width: 767.98px) {
  /* Prevent Card Headers & Filter Tabs from Truncating on Mobile */
  .card-header,
  .card-header > div {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .card-header .btn-group,
  .nav-pills,
  .nav-tabs {
    display: flex !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .card-header .btn-group::-webkit-scrollbar,
  .nav-pills::-webkit-scrollbar,
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .card-header .btn-group .btn,
  .nav-pills .nav-link,
  .nav-tabs .nav-link {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  /* ── Universal Single Card Transformation for Tables on Mobile ── */
  table.table-mobile-cards,
  table.compact-reminders-table,
  .table-responsive > table {
    display: block !important;
    width: 100% !important;
    border: none !important;
    table-layout: auto !important;
  }

  table.table-mobile-cards thead,
  table.compact-reminders-table thead,
  .table-responsive > table thead {
    display: none !important;
  }

  table.table-mobile-cards tbody,
  table.compact-reminders-table tbody,
  .table-responsive > table tbody {
    display: block !important;
    width: 100% !important;
  }

  table.table-mobile-cards tbody > tr,
  table.compact-reminders-table tbody > tr,
  .table-responsive > table tbody > tr {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: initial !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
    padding: 14px 16px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07) !important;
    position: relative !important;
    box-sizing: border-box !important;
  }

  table.table-mobile-cards tbody > tr > td,
  table.compact-reminders-table tbody > tr > td,
  .table-responsive > table tbody > tr > td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 1px dashed #e2e8f0 !important;
    text-align: left !important;
    white-space: normal !important;
    box-sizing: border-box !important;
  }

  /* Responsive Flex & Text Wrapping inside Mobile Card Cells */
  table.table-mobile-cards tbody > tr > td .flex-nowrap,
  .table-responsive > table tbody > tr > td .flex-nowrap {
    flex-wrap: wrap !important;
  }

  table.table-mobile-cards tbody > tr > td .text-truncate,
  .table-responsive > table tbody > tr > td .text-truncate {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100% !important;
  }

  table.table-mobile-cards tbody > tr > td .text-nowrap,
  .table-responsive > table tbody > tr > td .text-nowrap {
    white-space: normal !important;
  }

  table.table-mobile-cards tbody > tr > td .d-flex.flex-column.align-items-end,
  .table-responsive > table tbody > tr > td .d-flex.flex-column.align-items-end {
    align-items: flex-start !important;
  }

  table.table-mobile-cards tbody > tr > td:last-child,
  table.compact-reminders-table tbody > tr > td:last-child,
  .table-responsive > table tbody > tr > td:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-top: 6px !important;
  }

  /* Mobile Data Labels */
  table.table-mobile-cards tbody > tr > td::before,
  table.compact-reminders-table tbody > tr > td::before,
  .table-responsive > table tbody > tr > td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
  }

  /* Index Number Badge Top Right */
  table.table-mobile-cards tbody > tr > td[data-label="#"],
  table.compact-reminders-table tbody > tr > td[data-label="#"] {
    position: absolute;
    top: 12px;
    right: 14px;
    width: auto !important;
    border: none !important;
    padding: 0 !important;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px 8px !important;
  }

  table.table-mobile-cards tbody > tr > td[data-label="#"]::before,
  table.compact-reminders-table tbody > tr > td[data-label="#"]::before {
    display: none !important;
  }

  /* Mobile Actions Buttons Layout */
  table.table-mobile-cards tbody > tr > td[data-label="Actions"] .btn-group,
  table.compact-reminders-table tbody > tr > td[data-label="Actions"] .btn-group {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 6px !important;
  }

  table.table-mobile-cards tbody > tr > td[data-label="Actions"] .btn-group .btn,
  table.compact-reminders-table tbody > tr > td[data-label="Actions"] .btn-group .btn {
    flex: 1 1 auto !important;
    border-radius: 6px !important;
  }

  /* 2-Row Record Cards Seamless Joining on Mobile (<768px) */
  table.table-mobile-cards tbody > tr.table-2row-record-primary {
    margin-bottom: 0 !important;
    border-bottom: 1px dashed #cbd5e1 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    box-shadow: none !important;
  }

  table.table-mobile-cards tbody > tr.table-2row-record-secondary {
    margin-top: -1px !important;
    margin-bottom: 16px !important;
    border-top: none !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    background-color: #f8fafc !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
  }

  table.table-mobile-cards tbody > tr > td[data-label="Actions"] .d-flex,
  table.table-mobile-cards tbody > tr > td[data-label="Amount & Actions"] .d-flex {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }

  table.table-mobile-cards tbody > tr > td[data-label="Actions"] .d-flex .btn,
  table.table-mobile-cards tbody > tr > td[data-label="Amount & Actions"] .d-flex .btn {
    flex: 1 1 auto !important;
  }

  /* Document Expiry Chips & Badges in Reminders (iPhone 15+ Overflow Fix) */
  .reminder-doc-chip {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .doc-cell-box {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .doc-cell-box .btn,
  .doc-cell-box a,
  .doc-cell-box button,
  .doc-cell-box .badge {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Universal Badge Protection on Mobile (Prevents Agent/Mobile badge overflow) */
  .badge {
    max-width: 100% !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  .badge.font-monospace,
  .badge.text-nowrap,
  .badge.fs-7,
  .badge.fs-8 {
    white-space: nowrap !important;
  }

  /* Settlement Page Header & Filter Pill Buttons Fix for Narrow Mobile Screens */
  #settlementContentContainer .btn {
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Extra Small Button Class for Chips and Badges */
  .btn-xs {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.76rem !important;
    border-radius: 6px !important;
    line-height: 1.25 !important;
  }

  /* Page Bottom Padding Fix for Assistive Ball overlap */
  .admin-main,
  .main-content,
  body {
    padding-bottom: 95px !important;
  }
}

/* ── Universal Document Expiry Badge Protection ── */
.doc-cell-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  flex-wrap: wrap;
}

.reminder-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  flex-wrap: wrap;
}

.reminder-doc-chip > span:first-child {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* ── Floating Scroll To Top Quick Action Button ── */
.scroll-to-top-btn {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 1050;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.scroll-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45);
}

.scroll-to-top-btn:active {
  transform: scale(0.92);
}

