@import "tailwindcss";
@import "@heroui/styles";

:root {
  --accent: oklch(0.467 0.1575 7.95);
}
.dashboard-reveal > .dashboard-card {
  transition:
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.dashboard-reveal:focus-within > .dashboard-card {
  border-color: rgb(157 36 73 / 25%);
  box-shadow: 0 10px 28px -18px rgb(39 39 42 / 28%);
}

.dashboard-surface a {
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease;
}

.dashboard-surface a:focus-visible {
  border-radius: 4px;
  outline: 2px solid #9d2449;
  outline-offset: 4px;
}

@media (hover: hover) {
  .dashboard-reveal:hover > .dashboard-card {
    border-color: rgb(157 36 73 / 25%);
    box-shadow: 0 10px 28px -18px rgb(39 39 42 / 28%);
  }

  .dashboard-surface a:hover {
    color: #801c3a;
    text-decoration-thickness: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-reveal > .dashboard-card,
  .dashboard-surface a {
    transition: none;
  }
}

/* Bridge existing dashboard colors to the active HeroUI theme. */
.app-theme {
  background: var(--background);
  color: var(--foreground);
}
html.dark {
  --accent: oklch(0.76 0.12 7.95);
}
html.dark .app-theme :is([class~="bg-white"], [class~="bg-white/95"]) {
  background-color: var(--surface);
}
html.dark
  .app-theme
  :is([class~="bg-[#f5f6fa]"], [class~="bg-[#fafafa]"], [class~="bg-slate-100"]) {
  background-color: var(--background);
}
html.dark .app-theme :is([class~="bg-zinc-50"], [class~="bg-zinc-100"], [class~="bg-zinc-100/80"]) {
  background-color: var(--default);
}
html.dark
  .app-theme
  :is(
    [class~="text-zinc-950"],
    [class~="text-zinc-900"],
    [class~="text-zinc-800"],
    [class~="text-zinc-700"]
  ) {
  color: var(--foreground);
}
html.dark
  .app-theme
  :is([class~="text-zinc-600"], [class~="text-zinc-500"], [class~="text-zinc-400"]) {
  color: var(--muted);
}
html.dark .app-theme [class~="text-[#9d2449]"] {
  color: var(--accent);
}
html.dark
  .app-theme
  :is(
    [class~="border-zinc-100"],
    [class~="border-zinc-200"],
    [class~="border-zinc-200/70"],
    [class~="border-zinc-200/80"],
    [class~="border-zinc-300"]
  ) {
  border-color: var(--separator);
}
html.dark
  .app-theme
  :is([class~="divide-zinc-100"], [class~="divide-zinc-200"])
  > :not(:last-child) {
  border-color: var(--separator);
}
html.dark .app-theme :is([class~="hover:bg-zinc-100"], [class~="hover:bg-zinc-200"]):hover {
  background-color: var(--default);
}
html.dark .app-theme [class~="hover:text-zinc-900"]:hover {
  color: var(--foreground);
}
html.dark .app-theme img[src*="icatep.png"] {
  border-radius: 0.5rem;
  background: white;
  padding: 0.375rem;
}

/* Shared secondary action links; PDF resources keep their own presentation. */
a.action-link {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.625rem 1rem;
  background: var(--default);
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 180ms ease;
}
a.action-link:hover {
  background: color-mix(in oklab, var(--default), var(--foreground) 6%);
  color: var(--foreground);
  text-decoration: none;
}
a.action-link:focus-visible {
  border-radius: 9999px;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  a.action-link {
    transition: none;
  }
}

/* Softer light workspace; notification popovers retain their theme surface. */
html:not(.dark) {
  --background: #eef0f4;
}
.dashboard-workspace {
  background: var(--background);
}

/* Neutral secondary notice surface; status colors stay on text and icons. */
.system-alert--secondary {
  background-color: #f1f2f5;
  box-shadow: none;
}
html.dark .system-alert--secondary {
  background-color: var(--default);
}
