:root {
  --wani-focus: #2563eb;
  --wani-focus-ring: rgba(37, 99, 235, 0.28);
  --wani-text-strong: #0f172a;
  --wani-text-muted: #475569;
  --wani-border: rgba(15, 23, 42, 0.14);
  --wani-surface: rgba(255, 255, 255, 0.94);
  --wani-row-hover: rgba(37, 99, 235, 0.055);
}

html,
body,
#root {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  background: #f6f8fb;
}

*,
*::before,
*::after {
  min-width: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"] {
  min-height: 36px;
  touch-action: manipulation;
}

button {
  border-radius: 8px !important;
}

button:hover {
  filter: brightness(0.985);
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--wani-focus-ring) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 1px var(--wani-focus) !important;
}

input,
select,
textarea {
  border-radius: 8px !important;
  line-height: 1.35;
}

input::placeholder,
textarea::placeholder {
  color: #64748b !important;
  opacity: 1;
}

table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-variant-numeric: tabular-nums;
}

th {
  color: var(--wani-text-strong) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  border-bottom-color: var(--wani-border) !important;
}

td,
th {
  vertical-align: middle;
}

tbody tr:hover {
  background: var(--wani-row-hover) !important;
}

img {
  max-width: 100%;
  height: auto;
}

[style*="overflow-x: auto"],
.wani-scroll-mob {
  scrollbar-gutter: stable;
}

[data-theme="dark"] {
  color-scheme: dark;
  --wani-focus: #93c5fd;
  --wani-focus-ring: rgba(147, 197, 253, 0.34);
  --wani-text-strong: #f8fafc;
  --wani-text-muted: #cbd5e1;
  --wani-border: rgba(226, 232, 240, 0.18);
  --wani-surface: rgba(15, 23, 42, 0.94);
  --wani-row-hover: rgba(147, 197, 253, 0.08);
}

[data-theme="dark"] th {
  background: rgba(15, 23, 42, 0.96) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme="dark"] [style*="rgba(203,213,225,0.65)"],
[data-theme="dark"] [style*="rgba(203,213,225,0.7)"],
[data-theme="dark"] [style*="rgba(203,213,225,0.75)"],
[data-theme="dark"] [style*="rgba(148,163,184,0.6)"] {
  color: rgba(226, 232, 240, 0.88) !important;
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  table {
    min-width: 720px;
  }

  [style*="padding: 32px"] {
    padding: 18px 14px 120px !important;
  }

  [style*="gap: 14px"] {
    gap: 10px !important;
  }

  button,
  [role="button"] {
    min-height: 40px;
  }
}

@media (max-width: 560px) {
  [style*="padding: 12px 10px 120px"] {
    padding: 10px 8px 112px !important;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  table {
    min-width: 660px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
