    ::-webkit-scrollbar { width: 8px; height: 8px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
    .dark ::-webkit-scrollbar-thumb { background: #475569; }
    .custom-scrollbar::-webkit-scrollbar { display: none; }
    .custom-scrollbar:hover::-webkit-scrollbar { display: block; }
  /* ACTION MENU FIX */
.dropdown-menu {
    position: absolute;
    min-width: 240px;          /* you liked it wider 👍 */
    max-height: 260px;         /* 👈 THIS is the key fix */
    overflow-y: auto;          /* 👈 enables scrolling */
    z-index: 9999;
}

/* Keep items tidy */
.dropdown-menu li {
    padding: 10px 12px;
    white-space: nowrap;
}


/* Mobile sidebar footer visibility */
@media (max-width: 767px) {
  aside {
    overscroll-behavior: contain;
  }
}

/* Edit details polish */
.edit-details-soft-card {
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}


/* Round 5 polish */
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.55);
  border-radius: 9999px;
}

@media (max-width: 767px) {
  .sidebar {
    padding-bottom: 6rem;
  }
}


/* Invoice preview safeguards */
@media (max-width: 900px) {
  .invoice-preview-toolbar {
    flex-wrap: wrap;
  }
}


/* Edit Details alignment polish */
@media (min-width: 768px) {
  .edit-details-form-grid-top {
    align-items: start;
  }
}


/* Targeted client email row alignment */
.edit-details-client-email-row,
.client-email-row {
  align-items: start;
}


/* Client tab email + button alignment fix only */
@media (min-width: 768px) {
  .client-email-row,
  .edit-details-client-email-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 52px !important;
    column-gap: 12px !important;
    align-items: start !important;
  }

  .client-email-row > .email-fields-wrap,
  .edit-details-client-email-row > .email-fields-wrap {
    min-width: 0;
  }

  .client-email-row .email-add-btn,
  .edit-details-client-email-row .email-add-btn {
    width: 52px !important;
    height: 52px !important;
    margin-top: 22px !important;
    align-self: start !important;
    justify-self: start !important;
  }
}

/* Phase 5 history timeline */
.history-timeline-item {
  position: relative;
}
.history-timeline-dot {
  position: absolute;
  left: 0;
  top: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgb(59 130 246);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.history-timeline-line {
  position: absolute;
  left: 5px;
  top: 1.75rem;
  bottom: -1.5rem;
  width: 2px;
  background: rgba(148, 163, 184, 0.35);
}
.dark .history-timeline-line {
  background: rgba(71, 85, 105, 0.6);
}


/* UI polish: softer colour and consistent box shadows */
body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.05), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f1f5fb 100%);
}

.dark body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 24%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.07), transparent 18%),
    linear-gradient(180deg, #020617 0%, #0b1120 100%);
}

#root .rounded-xl:not(.rounded-full),
#root .rounded-2xl:not(.rounded-full),
#root .rounded-3xl:not(.rounded-full),
#root .dropdown-menu,
#root aside {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07), 0 2px 10px rgba(59, 130, 246, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

#root .bg-white,
#root .bg-slate-50,
#root .dropdown-menu {
  border-color: rgba(148, 163, 184, 0.22);
}

#root .bg-white.rounded-xl,
#root .bg-white.rounded-2xl,
#root .bg-white.rounded-3xl,
#root .bg-slate-50.rounded-xl,
#root .bg-slate-50.rounded-2xl,
#root .bg-slate-50.rounded-3xl,
#root .dropdown-menu {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98));
  backdrop-filter: blur(8px);
}

.dark #root .dark\:bg-slate-900.rounded-xl,
.dark #root .dark\:bg-slate-900.rounded-2xl,
.dark #root .dark\:bg-slate-900.rounded-3xl,
.dark #root .dark\:bg-slate-800.rounded-xl,
.dark #root .dark\:bg-slate-800.rounded-2xl,
.dark #root .dark\:bg-slate-800.rounded-3xl,
.dark #root .dropdown-menu {
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
  border-color: rgba(96, 165, 250, 0.18);
}

#root .dropdown-menu {
  background-color: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 6px 18px rgba(59, 130, 246, 0.10);
  border-radius: 18px;
}

.dark #root .dropdown-menu {
  background-color: rgba(15, 23, 42, 0.98);
}

.dropdown-menu li:hover {
  background: rgba(59, 130, 246, 0.08);
}

.dark .dropdown-menu li:hover {
  background: rgba(59, 130, 246, 0.16);
}

.edit-details-soft-card {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.09), 0 6px 18px rgba(59, 130, 246, 0.06);
}

#root .text-blue-600,
#root .dark\:text-blue-400 {
  color: #2563eb;
}

#root .bg-blue-50 {
  background-color: rgba(59, 130, 246, 0.10);
}

#root .border-slate-200,
#root .border-slate-200\/80,
#root .border-slate-100 {
  border-color: rgba(148, 163, 184, 0.20);
}


/* === UI colour polish === */
:root {
  --ui-page-bg: linear-gradient(180deg, #f7fbff 0%, #fdfcff 45%, #f7fafc 100%);
  --ui-line: #bfd4f6;
  --ui-text-strong: #1e3a8a;
  --ui-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --ui-shadow-strong: 0 14px 34px rgba(37, 99, 235, 0.14);
}

body {
  background: var(--ui-page-bg);
}

#root {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(191, 219, 254, 0.22), transparent 26%),
    radial-gradient(circle at top right, rgba(233, 213, 255, 0.20), transparent 24%),
    radial-gradient(circle at bottom right, rgba(204, 251, 241, 0.16), transparent 22%);
}

.bg-white,
[class*="bg-white"],
.rounded-2xl,
.rounded-3xl,
.rounded-xl {
  box-shadow: var(--ui-shadow);
}

.border,
[class*="border-slate-"],
[class*="border-gray-"] {
  border-color: var(--ui-line) !important;
}

table thead,
thead tr,
.table thead {
  background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
}

th {
  color: var(--ui-text-strong) !important;
  font-weight: 700;
}

hr,
.divide-y > :not([hidden]) ~ :not([hidden]) {
  border-color: #d7e6fb !important;
}

input,
select,
textarea {
  background: #ffffff !important;
  border-color: #a9c5ef !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #4f7ddc !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18) !important;
}

button,
.btn,
[role="button"] {
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.10);
}

button[class*="bg-blue"],
button[class*="bg-indigo"],
.bg-blue-600,
.bg-blue-700,
.bg-indigo-600,
.bg-indigo-700 {
  background: linear-gradient(180deg, #4f87ff 0%, #2f66e8 100%) !important;
  border-color: #2f66e8 !important;
  color: #ffffff !important;
}

button[class*="bg-slate"],
button[class*="bg-gray"],
.bg-slate-100,
.bg-slate-50,
.bg-gray-100 {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%) !important;
}

.text-slate-900,
.text-gray-900,
.text-slate-800,
.text-gray-800 {
  color: #20324f !important;
}

.text-slate-700,
.text-gray-700,
.text-slate-600,
.text-gray-600 {
  color: #49607f !important;
}

.text-slate-500,
.text-gray-500,
.text-slate-400,
.text-gray-400 {
  color: #6b85a6 !important;
}

.text-blue-600,
.text-blue-700,
.text-indigo-600,
.text-indigo-700 {
  color: #255fda !important;
}

.text-emerald-600,
.text-green-600,
.text-teal-600 {
  color: #0f766e !important;
}

.text-rose-600,
.text-red-600 {
  color: #c2416c !important;
}

.bg-slate-50,
.bg-gray-50 {
  background: #f8fbff !important;
}

.bg-slate-100,
.bg-gray-100 {
  background: #eef5ff !important;
}

[class*="bg-amber-"],
[class*="bg-yellow-"] {
  background-color: #fff7d6 !important;
}

[class*="bg-emerald-"],
[class*="bg-green-"] {
  background-color: #ecfdf5 !important;
}

[class*="bg-rose-"],
[class*="bg-red-"] {
  background-color: #fff1f2 !important;
}

[class*="bg-violet-"],
[class*="bg-purple-"] {
  background-color: #f5f0ff !important;
}

nav, aside, header {
  background-image: linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(255, 255, 255, 0.96));
}

aside .rounded-2xl,
nav .rounded-2xl,
header .rounded-2xl,
[data-open="true"],
[aria-expanded="true"] {
  box-shadow: var(--ui-shadow-strong);
}

.modal,
[role="dialog"],
.fixed.inset-0 .rounded-2xl,
.fixed.inset-0 .rounded-3xl {
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18) !important;
}

section > .rounded-2xl:nth-of-type(3n+1),
.grid > .rounded-2xl:nth-of-type(3n+1),
.grid > div[class*="rounded"]:nth-of-type(3n+1) {
  background-image: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

section > .rounded-2xl:nth-of-type(3n+2),
.grid > .rounded-2xl:nth-of-type(3n+2),
.grid > div[class*="rounded"]:nth-of-type(3n+2) {
  background-image: linear-gradient(180deg, #ffffff 0%, #fff9fc 100%);
}

section > .rounded-2xl:nth-of-type(3n),
.grid > .rounded-2xl:nth-of-type(3n),
.grid > div[class*="rounded"]:nth-of-type(3n) {
  background-image: linear-gradient(180deg, #ffffff 0%, #f7fffb 100%);
}

table tbody tr:hover {
  background: rgba(191, 219, 254, 0.18) !important;
}

a, .link {
  color: #255fda;
}


/* targeted stat-card polish */
.bg-emerald-50\/80,
.bg-rose-50\/80,
.bg-sky-50\/90,
.bg-violet-50\/75,
.bg-amber-50\/90 {
  backdrop-filter: blur(2px);
}

/* Strong action button color fixes */
button.bg-slate-800,
button.bg-slate-900,
button.hover\:bg-slate-900,
button.hover\:bg-slate-800 {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
}

button.bg-rose-500,
button.bg-rose-600,
button.bg-rose-700,
button.hover\:bg-rose-600,
button.hover\:bg-rose-700 {
  background: linear-gradient(180deg, #ef5a84 0%, #d94672 100%) !important;
  border-color: #d94672 !important;
  color: #ffffff !important;
}

button.bg-rose-500 i,
button.bg-rose-600 i,
button.bg-rose-700 i,
button.bg-slate-800 i,
button.bg-slate-900 i {
  color: inherit !important;
}


/* Mobile viewport + safe area helpers */
.mobile-vh {
  min-height: 100dvh;
  height: 100dvh;
}
.mobile-safe-bottom {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
}
@media (max-width: 767px) {
  .mobile-content-safe {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6rem) !important;
  }
}


/* Dark mode consistency fix */
html.dark body {
  background: linear-gradient(180deg, #020617 0%, #0b1120 100%) !important;
  color: #e2e8f0;
}
html.dark #root {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 22%),
    linear-gradient(180deg, #020617 0%, #0b1120 100%) !important;
}
html.dark .edit-details-page-shell {
  background: #020617 !important;
}
html.dark .edit-details-page-shell .bg-white,
html.dark .edit-details-page-shell .from-white,
html.dark .edit-details-page-shell .to-slate-50\/70 {
  background: #020617 !important;
}
html.dark .edit-details-page-shell .from-white,
html.dark .edit-details-page-shell .to-slate-50\/70 {
  background-image: none !important;
}
html.dark .edit-details-page-shell .border-slate-200,
html.dark .edit-details-page-shell .border-slate-200\/80,
html.dark .edit-details-page-shell .border-slate-100 {
  border-color: rgba(51, 65, 85, 0.75) !important;
}
html.dark .edit-details-page-shell .text-slate-800,
html.dark .edit-details-page-shell .text-slate-700 {
  color: #e5e7eb !important;
}
html.dark .edit-details-page-shell .text-slate-500,
html.dark .edit-details-page-shell .text-slate-400 {
  color: #94a3b8 !important;
}

/* === Dark mode real pass === */
html.dark,
html.dark body,
html.dark #root {
  background: #020617 !important;
  color: #e5e7eb;
}
html.dark header,
html.dark aside,
html.dark .bg-white,
html.dark .bg-slate-50,
html.dark .from-white,
html.dark .to-slate-50\/70,
html.dark .from-slate-50,
html.dark .to-white,
html.dark .edit-details-page-shell,
html.dark .edit-details-page-shell > div,
html.dark .edit-details-page-shell .rounded-3xl,
html.dark .edit-details-page-shell .rounded-2xl,
html.dark .edit-details-page-shell .rounded-xl {
  background-image: none !important;
}
html.dark header,
html.dark aside {
  background-color: #020617 !important;
}
html.dark .bg-white,
html.dark .bg-slate-50,
html.dark .edit-details-page-shell,
html.dark .edit-details-page-shell > div {
  background-color: #0f172a !important;
}
html.dark .edit-details-page-shell .bg-slate-50,
html.dark .edit-details-page-shell .bg-white,
html.dark .edit-details-page-shell .from-white,
html.dark .edit-details-page-shell .to-slate-50\/70 {
  background-color: #0f172a !important;
}
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-200\/80,
html.dark .border-slate-300 {
  border-color: rgba(51, 65, 85, 0.9) !important;
}
html.dark .text-slate-800,
html.dark .text-slate-700,
html.dark .text-slate-600 {
  color: #e5e7eb !important;
}
html.dark .text-slate-500,
html.dark .text-slate-400 {
  color: #94a3b8 !important;
}
html.dark input,
html.dark select,
html.dark textarea {
  background-color: #111827 !important;
  color: #e5e7eb !important;
  border-color: rgba(71,85,105,0.9) !important;
}
html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #94a3b8 !important;
}
html.dark table thead,
html.dark thead tr,
html.dark .table thead {
  background: #0b1220 !important;
}
html.dark .shadow-sm,
html.dark .shadow-xl,
html.dark .shadow-2xl {
  box-shadow: 0 12px 28px rgba(0,0,0,0.45) !important;
}
html.dark .status-pill,
html.dark [class*='bg-emerald-50'],
html.dark [class*='bg-rose-50'],
html.dark [class*='bg-amber-50'],
html.dark [class*='bg-blue-50'] {
  filter: saturate(0.9);
}


/* === Focused dark mode repair === */
html.dark body {
  background: linear-gradient(180deg, #020617 0%, #0b1120 100%) !important;
  color: #e5e7eb !important;
}

html.dark #root {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 20%),
    linear-gradient(180deg, #020617 0%, #0b1120 100%) !important;
}

html.dark .bg-white,
html.dark [class*="bg-white"],
html.dark .bg-slate-50,
html.dark [class*="bg-slate-50"],
html.dark .bg-slate-100,
html.dark [class*="bg-slate-100"] {
  background: #0f172a !important;
  color: #e5e7eb !important;
}

html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700 {
  color: #e5e7eb !important;
}

html.dark .text-slate-600,
html.dark .text-slate-500 {
  color: #94a3b8 !important;
}

html.dark .border,
html.dark [class*="border-slate-"],
html.dark [class*="border-gray-"] {
  border-color: rgba(71, 85, 105, 0.9) !important;
}

html.dark input,
html.dark textarea,
html.dark select {
  background: #0b1220 !important;
  color: #e5e7eb !important;
  border-color: rgba(71, 85, 105, 0.9) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b !important;
}

html.dark thead,
html.dark thead tr,
html.dark table thead,
html.dark .table thead {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
}

html.dark aside {
  background: #020617 !important;
  border-color: rgba(71, 85, 105, 0.9) !important;
}

html.dark .dropdown-menu {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: rgba(71, 85, 105, 0.9) !important;
}

html.dark .shadow-sm,
html.dark .shadow,
html.dark .shadow-xl,
html.dark .shadow-2xl {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
}


/* Focused dark-mode cleanup */
html.dark, .dark body {
  color-scheme: dark;
}

.dark body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 22%),
    linear-gradient(180deg, #020617 0%, #071226 55%, #0b1730 100%) !important;
}

.dark #root {
  background: transparent !important;
}

.dark #root .bg-white,
.dark #root .bg-slate-50,
.dark #root .bg-slate-100,
.dark #root .bg-blue-50,
.dark #root .bg-green-50,
.dark #root .bg-rose-50,
.dark #root .bg-amber-50,
.dark #root .bg-purple-50,
.dark #root [class*='bg-white'],
.dark #root [class*='bg-slate-50'],
.dark #root [class*='bg-slate-100'] {
  background: linear-gradient(180deg, rgba(8, 18, 40, 0.96), rgba(10, 24, 52, 0.98)) !important;
  color: #e5eefc !important;
  border-color: rgba(96, 165, 250, 0.20) !important;
}

.dark #root input,
.dark #root textarea,
.dark #root select,
.dark #root option {
  background-color: rgba(5, 15, 35, 0.92) !important;
  color: #e5eefc !important;
  border-color: rgba(96, 165, 250, 0.22) !important;
}

.dark #root input::placeholder,
.dark #root textarea::placeholder {
  color: #93a9c9 !important;
}

.dark #root .text-slate-900,
.dark #root .text-slate-800,
.dark #root .text-slate-700,
.dark #root .text-slate-600,
.dark #root .text-slate-500,
.dark #root .text-slate-400,
.dark #root [class*='text-slate-9'],
.dark #root [class*='text-slate-8'],
.dark #root [class*='text-slate-7'],
.dark #root [class*='text-slate-6'],
.dark #root [class*='text-slate-5'],
.dark #root [class*='text-slate-4'] {
  color: #d9e7fb !important;
}

.dark #root .text-blue-600,
.dark #root .text-blue-500,
.dark #root .text-emerald-600,
.dark #root .text-green-600,
.dark #root .text-rose-600,
.dark #root .text-amber-600,
.dark #root .text-purple-600 {
  filter: saturate(1.05) brightness(1.1);
}

.dark #root table,
.dark #root thead,
.dark #root tbody,
.dark #root tr,
.dark #root td,
.dark #root th {
  border-color: rgba(96, 165, 250, 0.16) !important;
}

.dark #root .shadow-xl,
.dark #root .shadow-2xl,
.dark #root .shadow-lg,
.dark #root .shadow-md {
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.38), 0 8px 20px rgba(15, 23, 42, 0.28) !important;
}

.dark #root .ring-slate-200,
.dark #root .ring-slate-100,
.dark #root .ring-1 {
  --tw-ring-color: rgba(96, 165, 250, 0.16) !important;
}


/* === Dark mode final polish === */
html.dark aside,
.dark aside {
  background: linear-gradient(180deg, #091327 0%, #081120 100%) !important;
  border-right-color: rgba(96, 165, 250, 0.18) !important;
}

html.dark aside button,
.dark aside button {
  color: #c8d8f0 !important;
}

html.dark aside button:hover,
.dark aside button:hover {
  color: #ffffff !important;
}

html.dark aside .text-slate-400,
html.dark aside .text-slate-500,
html.dark aside .text-slate-600,
.dark aside .text-slate-400,
.dark aside .text-slate-500,
.dark aside .text-slate-600 {
  color: #c8d8f0 !important;
}

html.dark aside .border-slate-200,
html.dark aside .border-slate-800\/50,
.dark aside .border-slate-200,
.dark aside .border-slate-800\/50 {
  border-color: rgba(96, 165, 250, 0.18) !important;
}

html.dark aside .hover\:bg-slate-100:hover,
.dark aside .hover\:bg-slate-100:hover {
  background: rgba(59, 130, 246, 0.10) !important;
}

html.dark aside .bg-slate-50,
.dark aside .bg-slate-50 {
  background: transparent !important;
}

html.dark aside img,
.dark aside img {
  filter: none !important;
}

html.dark .bg-emerald-50,
html.dark .bg-rose-50,
html.dark .bg-amber-50,
html.dark .bg-blue-50,
html.dark .bg-cyan-50,
html.dark .bg-purple-50,
html.dark .bg-violet-50,
html.dark .bg-indigo-50,
html.dark .bg-green-50,
html.dark .bg-red-50,
html.dark .bg-yellow-50,
html.dark [class*="bg-emerald-50"],
html.dark [class*="bg-rose-50"],
html.dark [class*="bg-amber-50"],
html.dark [class*="bg-blue-50"],
html.dark [class*="bg-cyan-50"],
html.dark [class*="bg-purple-50"],
html.dark [class*="bg-violet-50"],
html.dark [class*="bg-indigo-50"],
html.dark [class*="bg-green-50"],
html.dark [class*="bg-red-50"],
html.dark [class*="bg-yellow-50"] {
  background: linear-gradient(180deg, rgba(8, 22, 46, 0.96), rgba(10, 28, 56, 0.98)) !important;
  border-color: rgba(96, 165, 250, 0.20) !important;
}

html.dark .bg-emerald-50 *,
html.dark .bg-rose-50 *,
html.dark .bg-amber-50 *,
html.dark .bg-blue-50 *,
html.dark .bg-cyan-50 *,
html.dark .bg-purple-50 *,
html.dark .bg-violet-50 *,
html.dark .bg-indigo-50 *,
html.dark .bg-green-50 *,
html.dark .bg-red-50 *,
html.dark .bg-yellow-50 * {
  text-shadow: none !important;
}

html.dark .status-pill,
html.dark [class*="rounded-full"] {
  border-color: rgba(96, 165, 250, 0.18);
}

html.dark .status-pill.bg-white,
html.dark .status-pill[class*="bg-white"] {
  background: rgba(8, 22, 46, 0.96) !important;
}

/* === Dark mode targeted repair: sidebar + summary cards === */
html.dark aside,
html.dark aside nav,
html.dark aside .custom-scrollbar,
html.dark aside .sticky,
.dark aside,
.dark aside nav,
.dark aside .custom-scrollbar,
.dark aside .sticky {
  background: linear-gradient(180deg, #030b18 0%, #061226 100%) !important;
}

html.dark aside,
.dark aside {
  color: #dbe8ff !important;
  border-right-color: rgba(96, 165, 250, 0.16) !important;
}

html.dark aside button,
.dark aside button {
  color: #dbe8ff !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.dark aside button span,
html.dark aside button i,
.dark aside button span,
.dark aside button i {
  color: inherit !important;
  opacity: 1 !important;
}

html.dark aside nav button,
.dark aside nav button {
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  padding: 0.9rem 0.5rem !important;
}

html.dark aside nav button:hover,
.dark aside nav button:hover {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #ffffff !important;
}

html.dark aside nav button.border-slate-300,
.dark aside nav button.border-slate-300 {
  border-left-color: transparent !important;
  border-bottom-color: transparent !important;
  background: rgba(59, 130, 246, 0.10) !important;
  color: #ffffff !important;
}

html.dark aside .text-slate-500,
html.dark aside .text-slate-400,
html.dark aside .text-slate-600,
.dark aside .text-slate-500,
.dark aside .text-slate-400,
.dark aside .text-slate-600 {
  color: #dbe8ff !important;
}

html.dark aside .text-rose-500,
.dark aside .text-rose-500 {
  color: #fb7185 !important;
}

html.dark aside .mobile-safe-bottom,
.dark aside .mobile-safe-bottom {
  background: linear-gradient(180deg, #05101f 0%, #020a16 100%) !important;
}

/* dashboard / invoices / expenses / clients summary surfaces */
html.dark [style*="#eefbf5"],
.dark [style*="#eefbf5"] {
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.50), rgba(6, 95, 70, 0.36)) !important;
  border-color: rgba(16, 185, 129, 0.32) !important;
}

html.dark [style*="#fff1f6"],
.dark [style*="#fff1f6"] {
  background: linear-gradient(180deg, rgba(136, 19, 55, 0.44), rgba(159, 18, 57, 0.30)) !important;
  border-color: rgba(244, 114, 182, 0.26) !important;
}

html.dark [style*="#eef6ff"],
.dark [style*="#eef6ff"] {
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.34), rgba(37, 99, 235, 0.22)) !important;
  border-color: rgba(96, 165, 250, 0.28) !important;
}

html.dark [style*="#f5f1ff"],
.dark [style*="#f5f1ff"] {
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.32), rgba(109, 40, 217, 0.20)) !important;
  border-color: rgba(167, 139, 250, 0.26) !important;
}

html.dark [style*="#fff8e8"],
.dark [style*="#fff8e8"] {
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.34), rgba(146, 64, 14, 0.22)) !important;
  border-color: rgba(251, 191, 36, 0.24) !important;
}

html.dark .bg-emerald-50,
html.dark .dark\:bg-emerald-900\/20,
.dark .bg-emerald-50,
.dark .dark\:bg-emerald-900\/20 {
  background: rgba(6, 78, 59, 0.42) !important;
  border-color: rgba(16, 185, 129, 0.24) !important;
}

html.dark .bg-purple-50,
html.dark .dark\:bg-purple-900\/20,
.dark .bg-purple-50,
.dark .dark\:bg-purple-900\/20 {
  background: rgba(88, 28, 135, 0.28) !important;
  border-color: rgba(168, 85, 247, 0.24) !important;
}

html.dark .bg-indigo-50,
html.dark .dark\:bg-indigo-900\/20,
.dark .bg-indigo-50,
.dark .dark\:bg-indigo-900\/20 {
  background: rgba(49, 46, 129, 0.30) !important;
  border-color: rgba(99, 102, 241, 0.24) !important;
}

html.dark .bg-rose-50,
html.dark .dark\:bg-rose-900\/20,
.dark .bg-rose-50,
.dark .dark\:bg-rose-900\/20 {
  background: rgba(136, 19, 55, 0.28) !important;
  border-color: rgba(244, 63, 94, 0.22) !important;
}

html.dark .bg-blue-50,
html.dark .dark\:bg-blue-900\/20,
html.dark .dark\:bg-blue-900\/30,
.dark .bg-blue-50,
.dark .dark\:bg-blue-900\/20,
.dark .dark\:bg-blue-900\/30 {
  background: rgba(30, 64, 175, 0.24) !important;
  border-color: rgba(96, 165, 250, 0.24) !important;
}

html.dark .bg-amber-50,
html.dark .dark\:bg-amber-900\/20,
.dark .bg-amber-50,
.dark .dark\:bg-amber-900\/20 {
  background: rgba(120, 53, 15, 0.26) !important;
  border-color: rgba(251, 191, 36, 0.22) !important;
}

html.dark .text-blue-900,
.dark .text-blue-900 {
  color: #dbeafe !important;
}

html.dark .text-violet-900,
.dark .text-violet-900 {
  color: #f5f3ff !important;
}
