/* Qudra visual polish v5: theme-safe depth, motion, and premium interactions. */
html { scroll-behavior: smooth; }
body { background: var(--app-bg); transition: background-color .38s ease, color .28s ease; }
#root { isolation: isolate; animation: qudra-app-reveal .48s cubic-bezier(.22, 1, .36, 1) both; }
main { position: relative; }
main::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 34%),
    radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 30%);
  opacity: .9; animation: qudra-ambient 14s ease-in-out infinite alternate;
}
button, a, [role="button"], input, select, textarea, [class*="card"], [class*="Card"], [role="dialog"] {
  transition-property: transform, box-shadow, border-color, background-color, color, opacity, filter;
  transition-duration: .24s; transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}
button:not(:disabled):hover, [role="button"]:not([aria-disabled="true"]):hover { transform: translateY(-1px); filter: saturate(1.06); }
button:not(:disabled):active, [role="button"]:not([aria-disabled="true"]):active { transform: translateY(0) scale(.975); }
[class*="card"], [class*="Card"] { backface-visibility: hidden; }
[class*="card"]:hover, [class*="Card"]:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  box-shadow: 0 18px 46px color-mix(in srgb, var(--app-bg) 72%, transparent), 0 0 0 1px color-mix(in srgb, var(--primary) 9%, transparent);
  transform: translateY(-2px);
}
[role="dialog"] { animation: qudra-dialog-in .32s cubic-bezier(.22, 1, .36, 1) both; }
table tbody tr { transition: background-color .2s ease, transform .2s ease; }
table tbody tr:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.sidebar { box-shadow: 12px 0 40px color-mix(in srgb, var(--app-bg) 55%, transparent); }
.sidebar a, .sidebar button { position: relative; overflow: hidden; }
.sidebar a::after, .sidebar button::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--primary-foreground) 8%, transparent), transparent 70%);
  transform: translateX(-120%); transition: transform .55s ease;
}
.sidebar a:hover::after, .sidebar button:hover::after { transform: translateX(120%); }
@keyframes qudra-app-reveal { from { opacity: 0; transform: translateY(5px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes qudra-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes qudra-ambient { from { transform: translate3d(-1%, 0, 0) scale(1); } to { transform: translate3d(1.5%, 1%, 0) scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
