@import url('/yoosh-sub2api-index-original.css');

/* YOOSH_DASHBOARD_THEME_ACTIVE
   Visual-only overlay for the Sub2API SPA. Keep Sub2API JS and auth logic untouched. */

:root {
  color-scheme: light;
  --yoosh-bg: #f7f8fb;
  --yoosh-bg-grid: rgba(17, 24, 39, 0.055);
  --yoosh-bg-glow-primary: rgba(124, 58, 237, 0.08);
  --yoosh-bg-glow-accent: rgba(5, 150, 105, 0.07);
  --yoosh-panel: #ffffff;
  --yoosh-panel-2: #f5f7fb;
  --yoosh-panel-3: #eef2f7;
  --yoosh-sidebar: rgba(255, 255, 255, 0.96);
  --yoosh-header: rgba(255, 255, 255, 0.92);
  --yoosh-card: rgba(255, 255, 255, 0.96);
  --yoosh-dialog: rgba(255, 255, 255, 0.98);
  --yoosh-input: #ffffff;
  --yoosh-line: rgba(17, 24, 39, 0.1);
  --yoosh-line-strong: rgba(17, 24, 39, 0.18);
  --yoosh-row-line: rgba(17, 24, 39, 0.07);
  --yoosh-text: #111827;
  --yoosh-muted: #5b6475;
  --yoosh-primary: #7c3aed;
  --yoosh-primary-2: #4f46e5;
  --yoosh-primary-text: #6d28d9;
  --yoosh-active-text: #5b21b6;
  --yoosh-primary-contrast: #ffffff;
  --yoosh-primary-soft: rgba(124, 58, 237, 0.08);
  --yoosh-primary-soft-strong: rgba(124, 58, 237, 0.13);
  --yoosh-primary-border: rgba(124, 58, 237, 0.28);
  --yoosh-active-bg: linear-gradient(135deg, rgba(124, 58, 237, 0.13), rgba(5, 150, 105, 0.08));
  --yoosh-active-border: rgba(124, 58, 237, 0.28);
  --yoosh-card-hover-border: rgba(124, 58, 237, 0.24);
  --yoosh-accent: #059669;
  --yoosh-danger: #e11d48;
  --yoosh-warning: #b45309;
  --yoosh-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  --yoosh-table-head: rgba(15, 23, 42, 0.045);
  --yoosh-row-hover: rgba(124, 58, 237, 0.06);
  --yoosh-nav-hover: rgba(124, 58, 237, 0.08);
  --yoosh-secondary-bg: rgba(17, 24, 39, 0.055);
  --yoosh-input-border: rgba(17, 24, 39, 0.14);
  --yoosh-input-placeholder: rgba(91, 100, 117, 0.72);
  --yoosh-input-focus: rgba(124, 58, 237, 0.74);
  --yoosh-input-focus-shadow: rgba(124, 58, 237, 0.15);
  --yoosh-label: #374151;
  --yoosh-green-border: rgba(5, 150, 105, 0.24);
  --yoosh-red-border: rgba(225, 29, 72, 0.24);
  --yoosh-yellow-border: rgba(180, 83, 9, 0.24);
  --yoosh-blue-border: rgba(124, 58, 237, 0.24);
  --yoosh-button-shadow: 0 12px 24px rgba(79, 70, 229, 0.18);
  --yoosh-scrollbar-thumb: rgba(124, 58, 237, 0.46);
  --yoosh-scrollbar-track: rgba(17, 24, 39, 0.055);
  --yoosh-scrollbar-border: rgba(255, 255, 255, 0.94);
}

html.dark {
  color-scheme: dark;
  --yoosh-bg: #090a0f;
  --yoosh-bg-grid: rgba(255, 255, 255, 0.018);
  --yoosh-bg-glow-primary: rgba(139, 92, 246, 0.16);
  --yoosh-bg-glow-accent: rgba(6, 214, 160, 0.1);
  --yoosh-panel: #11131a;
  --yoosh-panel-2: #171a23;
  --yoosh-panel-3: #202431;
  --yoosh-sidebar: rgba(13, 15, 22, 0.94);
  --yoosh-header: rgba(12, 14, 20, 0.92);
  --yoosh-card: rgba(17, 19, 26, 0.94);
  --yoosh-dialog: rgba(17, 19, 26, 0.98);
  --yoosh-input: #0d0f15;
  --yoosh-line: rgba(255, 255, 255, 0.12);
  --yoosh-line-strong: rgba(255, 255, 255, 0.2);
  --yoosh-row-line: rgba(255, 255, 255, 0.075);
  --yoosh-text: #f3f4f8;
  --yoosh-muted: #9fa7b8;
  --yoosh-primary: #8b5cf6;
  --yoosh-primary-2: #6d28d9;
  --yoosh-primary-text: #c4b5fd;
  --yoosh-active-text: #ddd6fe;
  --yoosh-primary-contrast: #ffffff;
  --yoosh-primary-soft: rgba(139, 92, 246, 0.1);
  --yoosh-primary-soft-strong: rgba(139, 92, 246, 0.18);
  --yoosh-primary-border: rgba(196, 181, 253, 0.32);
  --yoosh-active-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(6, 214, 160, 0.08));
  --yoosh-active-border: rgba(139, 92, 246, 0.36);
  --yoosh-card-hover-border: rgba(139, 92, 246, 0.32);
  --yoosh-accent: #06d6a0;
  --yoosh-danger: #fb7185;
  --yoosh-warning: #f7c948;
  --yoosh-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
  --yoosh-table-head: rgba(255, 255, 255, 0.045);
  --yoosh-row-hover: rgba(139, 92, 246, 0.075);
  --yoosh-nav-hover: rgba(139, 92, 246, 0.1);
  --yoosh-secondary-bg: rgba(255, 255, 255, 0.06);
  --yoosh-input-border: rgba(255, 255, 255, 0.14);
  --yoosh-input-placeholder: rgba(159, 167, 184, 0.72);
  --yoosh-input-focus: rgba(139, 92, 246, 0.78);
  --yoosh-input-focus-shadow: rgba(139, 92, 246, 0.18);
  --yoosh-label: #d8dcef;
  --yoosh-green-border: rgba(6, 214, 160, 0.28);
  --yoosh-red-border: rgba(251, 113, 133, 0.28);
  --yoosh-yellow-border: rgba(247, 201, 72, 0.28);
  --yoosh-blue-border: rgba(139, 92, 246, 0.28);
  --yoosh-button-shadow: 0 12px 28px rgba(109, 40, 217, 0.24);
  --yoosh-scrollbar-thumb: rgba(139, 92, 246, 0.54);
  --yoosh-scrollbar-track: rgba(255, 255, 255, 0.05);
  --yoosh-scrollbar-border: rgba(10, 10, 15, 0.9);
}

html,
body,
#app {
  min-height: 100%;
  background:
    linear-gradient(var(--yoosh-bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--yoosh-bg-grid) 1px, transparent 1px),
    radial-gradient(circle at 18% 12%, var(--yoosh-bg-glow-primary), transparent 30%),
    radial-gradient(circle at 88% 82%, var(--yoosh-bg-glow-accent), transparent 28%),
    var(--yoosh-bg) !important;
  background-size: 44px 44px, 44px 44px, auto, auto, auto !important;
  color: var(--yoosh-text) !important;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
}

#app > div,
[class*="min-h-screen"],
[class*="bg-gray-50"],
[class*="dark:bg-dark-900"],
[class*="dark:bg-dark-950"] {
  background: transparent !important;
  color: var(--yoosh-text) !important;
}

/* App shell and navigation */
[class*="sidebar"],
aside,
nav[class*="border"],
[class*="border-r"] {
  background: var(--yoosh-sidebar) !important;
  border-color: var(--yoosh-line) !important;
}

/* YOOSH_HIDE_SIDEBAR_VERSION_BADGE */
.sidebar-brand > .relative {
  display: none !important;
}

[class*="sidebar"] a,
aside a,
nav a {
  border-radius: 8px !important;
  color: var(--yoosh-muted) !important;
}

[class*="sidebar"] a:hover,
aside a:hover,
nav a:hover {
  background: var(--yoosh-nav-hover) !important;
  color: var(--yoosh-text) !important;
}

a.router-link-active,
a[aria-current="page"],
[class*="router-link-active"],
.sidebar-link-active {
  background: var(--yoosh-active-bg) !important;
  color: var(--yoosh-active-text) !important;
  border-color: var(--yoosh-active-border) !important;
}

header,
[class*="sticky"][class*="top"],
[class*="border-b"] {
  background: var(--yoosh-header) !important;
  border-color: var(--yoosh-line) !important;
  backdrop-filter: blur(16px);
}

/* Containers, cards, tables */
.card,
[class*="rounded-xl"],
[class*="rounded-2xl"],
[class*="bg-white"],
[class*="dark:bg-dark-800"],
[class*="dark:bg-dark-700"],
[class*="shadow-sm"],
[class*="shadow-xl"] {
  border-color: var(--yoosh-line) !important;
  background: var(--yoosh-card) !important;
  box-shadow: none !important;
}

[class*="rounded-xl"],
[class*="rounded-2xl"] {
  border-radius: 8px !important;
}

[class*="hover:shadow"],
[class*="hover:-translate"] {
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease !important;
}

[class*="hover:shadow"]:hover,
[class*="hover:-translate"]:hover {
  border-color: var(--yoosh-card-hover-border) !important;
  transform: translateY(-1px);
}

table {
  color: var(--yoosh-text) !important;
  border-color: var(--yoosh-line) !important;
}

thead,
[class*="bg-gray-100"],
[class*="dark:bg-dark-700"] {
  background: var(--yoosh-table-head) !important;
}

tbody tr {
  border-color: var(--yoosh-row-line) !important;
}

tbody tr:hover,
[class*="hover:bg-gray"]:hover {
  background: var(--yoosh-row-hover) !important;
}

/* Typography */
h1,
h2,
h3,
h4,
[class*="text-gray-900"],
[class*="dark:text-white"] {
  color: var(--yoosh-text) !important;
  letter-spacing: 0 !important;
}

[class*="text-gray-800"],
[class*="text-gray-700"],
[class*="text-gray-600"],
[class*="text-gray-500"],
[class*="dark:text-gray"],
[class*="dark:text-dark-300"],
[class*="dark:text-dark-400"],
[class*="dark:text-dark-500"] {
  color: var(--yoosh-muted) !important;
}

.text-primary-600,
.text-primary-500,
.text-primary-700,
.text-primary-400,
.dark\:text-primary-400,
.dark\:text-primary-300,
[class*="text-primary"] {
  color: var(--yoosh-primary-text) !important;
}

[class*="bg-primary-50"],
[class*="bg-primary-100"],
[class*="dark:bg-primary-900"],
[class*="dark:bg-primary-950"] {
  background: var(--yoosh-primary-soft) !important;
}

[class*="border-primary"] {
  border-color: var(--yoosh-primary-border) !important;
}

[class*="ring-primary"] {
  --tw-ring-color: var(--yoosh-input-focus) !important;
}

[aria-selected="true"],
[class*="select-option-selected"],
[class*="tab-active"] {
  color: var(--yoosh-active-text) !important;
  background: var(--yoosh-primary-soft-strong) !important;
  border-color: var(--yoosh-primary-border) !important;
}

/* Buttons and actions */
.btn,
button,
[role="button"] {
  border-radius: 8px !important;
  letter-spacing: 0 !important;
}

.btn-primary,
button[class*="btn-primary"],
[class*="bg-primary-600"],
[class*="bg-primary-500"] {
  color: var(--yoosh-primary-contrast) !important;
  background: linear-gradient(135deg, var(--yoosh-primary), var(--yoosh-primary-2)) !important;
  border-color: var(--yoosh-primary-border) !important;
  box-shadow: var(--yoosh-button-shadow) !important;
}

.btn-primary:hover,
button[class*="btn-primary"]:hover,
[class*="bg-primary-600"]:hover,
[class*="bg-primary-500"]:hover {
  filter: brightness(1.08);
}

.btn-secondary,
button[class*="btn-secondary"],
[class*="bg-gray-100"],
[class*="dark:bg-dark-700"] {
  color: var(--yoosh-text) !important;
  background: var(--yoosh-secondary-bg) !important;
  border-color: var(--yoosh-line) !important;
}

button:disabled,
[aria-disabled="true"] {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

/* Forms */
input,
textarea,
select,
.input,
[class*="form-input"] {
  color: var(--yoosh-text) !important;
  background: var(--yoosh-input) !important;
  border-color: var(--yoosh-input-border) !important;
  border-radius: 8px !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--yoosh-input-placeholder) !important;
}

input:focus,
textarea:focus,
select:focus,
.input:focus {
  border-color: var(--yoosh-input-focus) !important;
  box-shadow: 0 0 0 3px var(--yoosh-input-focus-shadow) !important;
  outline: none !important;
}

label,
.input-label {
  color: var(--yoosh-label) !important;
}

/* Status badges and semantic colors */
[class*="bg-green"],
[class*="text-green"] {
  border-color: var(--yoosh-green-border) !important;
}

[class*="bg-red"],
[class*="text-red"] {
  border-color: var(--yoosh-red-border) !important;
}

[class*="bg-yellow"],
[class*="text-yellow"],
[class*="bg-orange"],
[class*="text-orange"] {
  border-color: var(--yoosh-yellow-border) !important;
}

[class*="bg-blue"],
[class*="bg-indigo"],
[class*="bg-purple"] {
  border-color: var(--yoosh-blue-border) !important;
}

[class*="badge"],
[class*="rounded-full"] {
  border-radius: 999px !important;
}

/* Dialogs, drawers, dropdowns */
[class*="fixed"][class*="inset-0"],
[class*="bg-black/50"],
[class*="bg-black/60"] {
  backdrop-filter: blur(8px);
}

/* YOOSH_DISABLE_SUB2API_ONBOARDING
   Sub2API's driver.js onboarding can auto-start after login and block checkout clicks. */
.driver-overlay,
.driver-popover,
.driver-stage {
  display: none !important;
  pointer-events: none !important;
}

html.driver-active,
body.driver-active {
  overflow: auto !important;
}

.driver-active-element {
  z-index: auto !important;
  pointer-events: auto !important;
}

[class*="modal"],
[class*="dialog"],
[class*="dropdown"],
[class*="menu"],
[class*="popover"] {
  border-color: var(--yoosh-line) !important;
  background: var(--yoosh-dialog) !important;
  box-shadow: var(--yoosh-shadow) !important;
}

/* Scrollbar */
* {
  scrollbar-color: var(--yoosh-scrollbar-thumb) var(--yoosh-scrollbar-track);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--yoosh-scrollbar-track);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--yoosh-scrollbar-border);
  border-radius: 999px;
  background: var(--yoosh-scrollbar-thumb);
}

/* Keep dense dashboard layouts usable on mobile. */
@media (max-width: 768px) {
  [class*="p-6"] {
    padding: 1rem !important;
  }

  [class*="gap-6"] {
    gap: 1rem !important;
  }
}
