/* Jiwa Muda Organizer dashboard and console accents */
.app-console {
  --jiwa-maroon: #870e30;
  --jiwa-maroon-deep: #6d0725;
  --jiwa-ink: #260d18;
  --jiwa-line: #eadce2;
  --jiwa-card-shadow: 0 2px 4px rgb(58 17 35 / 7%);
}

html:not([data-theme="dark"]) .app-console {
  --color-text-primary: var(--jiwa-ink);
  --color-text-secondary: #4c3c44;
  --color-border: var(--jiwa-line);
  --color-border-light: #f0e8ec;
}

.app-console .sidebar-link-active {
  background: linear-gradient(135deg, #98173b, var(--jiwa-maroon-deep));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
  color: #fff;
}

.app-console .sidebar-link-active > svg,
html[data-theme="dark"] .app-console .sidebar-link-active > svg {
  color: #fff;
}

html[data-theme="dark"] .app-console .sidebar-link-active {
  background: linear-gradient(135deg, #a12649, #740c30);
  color: #fff;
}

.app-console > aside > div:last-child > span:first-child {
  background: var(--jiwa-maroon);
  color: #fff;
}

.app-console .app-global-search input {
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

.app-console :focus-visible {
  outline-color: var(--jiwa-maroon);
}

html:not([data-theme="dark"]) .app-console .app-global-search svg {
  color: var(--jiwa-maroon-deep);
}

.app-console .dashboard > div:first-child h1 {
  letter-spacing: -0.035em;
}

.app-console .dashboard > div:first-child h1 ~ div {
  width: 53px;
  height: 4px;
  background: var(--dash-accent);
}

.app-console .dashboard > div:first-child :is(label, button) {
  border-color: var(--color-border);
  box-shadow: var(--jiwa-card-shadow);
}

.app-console .dashboard > div:first-child svg,
.app-console .dashboard > .grid > :is(div, a):not(.dashboard-revenue) > div:first-child > span[aria-hidden="true"] {
  color: var(--dash-accent);
}

.app-console .dashboard > .grid:has(> .dashboard-revenue) > * {
  border-color: var(--color-border);
  box-shadow: var(--jiwa-card-shadow);
}

.app-console:has(.dashboard) .dashboard .dashboard-revenue {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: #8a2040;
  background: radial-gradient(ellipse at 5% 0%, #a75d73 0%, transparent 64%),
    linear-gradient(155deg, #8f2949 10%, var(--jiwa-maroon-deep) 88%);
  color: #fff;
}

.app-console .dashboard .dashboard-revenue::before {
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 52%;
  background: url("/brand/jiwamuda-card-wave-v1.png") center bottom / 100% 100% no-repeat;
  content: "";
  pointer-events: none;
}

.app-console .dashboard .dashboard-revenue :is(div, span) {
  color: inherit;
}

.app-console .dashboard .dashboard-revenue > div:first-child > span[aria-hidden="true"] {
  color: #fff;
}

.app-console .dashboard .dashboard-panel {
  border-color: var(--color-border);
  box-shadow: var(--jiwa-card-shadow);
}

.app-console .dashboard .dashboard-panel h3 {
  letter-spacing: -0.025em;
}

.app-console .dashboard .dashboard-panel :is(.text-navy-900, .text-navy-800),
.app-console .dashboard .text-navy-800 {
  color: var(--dash-accent);
}

.app-console .dashboard .dashboard-chart-baseline {
  background: var(--dash-accent);
}

.app-console .dashboard .dashboard-chart-bar {
  background: #a82f53;
}

.app-console .dashboard .dashboard-chart-bar-current {
  background: linear-gradient(#a52f53, var(--jiwa-maroon-deep));
}

.app-console:has(.dashboard) button[title$=" · Asisten AI"] {
  box-shadow: 0 12px 28px rgb(91 12 38 / 32%);
}

.app-console:has(.dashboard) button[title$=" · Asisten AI"] > span:first-child {
  background: radial-gradient(ellipse at 12% 0%, #a44860, transparent 75%),
    linear-gradient(145deg, #911b3e, var(--jiwa-maroon-deep));
}

html[data-theme="dark"] .app-console .dashboard {
  --dash-accent: #f6a4bd;
  --jiwa-card-shadow: 0 2px 5px rgb(0 0 0 / 25%);
}

html[data-theme="dark"] .app-console .dashboard .dashboard-chart-baseline {
  background: var(--dash-accent);
}

html[data-theme="dark"] .app-console .dashboard .dashboard-chart-bar {
  background: #c66385;
}

html[data-theme="dark"] .app-console .dashboard .dashboard-chart-bar-current {
  background: linear-gradient(#ed94b1, #971e48);
}

/* Replace the finance module's fixed brown utilities with the console palette. */
.app-console main .border-\[\#8a6a3a\],
.app-console main .hover\:border-\[\#b8905d\]:hover {
  border-color: var(--jiwa-finance-accent, var(--jiwa-maroon));
}

.app-console main .bg-\[\#8a6a3a\],
.app-console main .bg-\[\#b68b43\] {
  background-color: var(--jiwa-maroon);
}

.app-console main .bg-\[\#8a6a3a\]\/10 {
  background-color: rgb(135 14 48 / 10%);
}

.app-console main .bg-\[\#8a6a3a\]\/\[0\.07\] {
  background-color: rgb(135 14 48 / 7%);
}

.app-console main .text-\[\#8a6a3a\],
.app-console main .hover\:text-\[\#8a6a3a\]:hover {
  color: var(--jiwa-finance-accent, var(--jiwa-maroon));
}

html[data-theme="dark"] .app-console {
  --jiwa-finance-accent: #efa2b9;
}

html[data-theme="dark"] .app-console main .bg-white.text-\[\#8a6a3a\] {
  color: var(--jiwa-maroon);
}

@media screen and (min-width: 1024px) {
  html:not([data-theme="dark"]) .app-console:has(.dashboard)::after {
    position: fixed;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 300px;
    height: 70px;
    background: url("/brand/jiwamuda-footer-wave-v1.png") center bottom / 100% 100% no-repeat;
    opacity: 0.65;
    content: "";
    pointer-events: none;
  }
}
