/* Dist-only visual refresh for Lingxi AI. Keep this file last in index.html. */
:root {
  --background: #f7f9fc;
  --foreground: #172033;
  --muted: #eef3f8;
  --muted-foreground: #66758a;
  --accent: #246bfe;
  --secondary: #12b6a6;
  --tertiary: #f2b84b;
  --quaternary: #4f86ff;
  --border: #d8e0eb;
  --border-light: #eef3f8;
  --card: #ffffff;
  --ring: #246bfe;
}

html {
  background: #f7f9fc;
}

body {
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(247, 249, 252, .98) 38%, #f7f9fc),
    radial-gradient(circle at 50% 0, rgba(36, 107, 254, .08), transparent 34%);
  color: var(--foreground);
}

#root {
  background:
    linear-gradient(rgba(23, 32, 51, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, .035) 1px, transparent 1px),
    transparent;
  background-size: 40px 40px;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(36, 107, 254, .16);
  color: #0d1b31;
}

.font-display,
.page-title,
h1,
h2,
h3 {
  letter-spacing: 0;
}

.bg-background\/80,
header.bg-background\/80 {
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(216, 224, 235, .85);
  box-shadow: 0 12px 36px rgba(20, 31, 52, .06);
}

.backdrop-blur-sm,
.backdrop-blur-md,
.backdrop-blur-lg {
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}

.btn {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.btn-primary,
button.bg-accent,
a.bg-accent {
  border-color: transparent !important;
  background: linear-gradient(135deg, #246bfe, #0eb7a7) !important;
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(36, 107, 254, .22) !important;
}

.btn-primary:hover:not(:disabled),
button.bg-accent:hover,
a.bg-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(36, 107, 254, .28) !important;
}

.btn-primary:active:not(:disabled),
button.bg-accent:active,
a.bg-accent:active {
  transform: translateY(0);
  box-shadow: 0 9px 22px rgba(36, 107, 254, .2) !important;
}

.btn-secondary {
  border: 1px solid rgba(36, 107, 254, .2);
  background: #fff;
  border-radius: 12px;
  color: #1b2c46;
}

.btn-secondary:hover:not(:disabled) {
  background: #edf4ff;
  border-color: rgba(36, 107, 254, .45);
}

.card,
.card-hover,
.bg-white.border-2,
.bg-white\/95.border,
.bg-white.max-w-2xl,
.bg-white.max-w-md {
  border: 1px solid rgba(216, 224, 235, .9) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 18px 54px rgba(24, 39, 75, .09) !important;
}

.card-hover {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card-hover:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(36, 107, 254, .32) !important;
  box-shadow: 0 22px 60px rgba(24, 39, 75, .13) !important;
}

.input,
input,
textarea,
select {
  border: 1px solid #d8e0eb !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 1px 2px rgba(20, 31, 52, .03) !important;
}

.input:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(36, 107, 254, .68) !important;
  box-shadow: 0 0 0 4px rgba(36, 107, 254, .12) !important;
}

.label {
  color: #27364d;
  letter-spacing: 0;
  text-transform: none;
}

.badge {
  border: 1px solid rgba(216, 224, 235, .95);
  border-radius: 999px;
}

.text-accent {
  color: #246bfe !important;
}

.bg-accent\/10,
.bg-accent\/15,
.bg-accent\/20,
.bg-accent\/30 {
  background-color: rgba(36, 107, 254, .1) !important;
}

.bg-muted,
.bg-muted\/50,
.bg-muted\/60 {
  background-color: rgba(238, 243, 248, .88) !important;
}

.border-foreground,
.border-2,
.border-b-2 {
  border-color: rgba(23, 32, 51, .14) !important;
}

.shadow-card,
.shadow-pop,
[style*="box-shadow"] {
  box-shadow: 0 14px 36px rgba(24, 39, 75, .09) !important;
}

.dot-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Landing and home views */
.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto {
  max-width: none !important;
  background:
    linear-gradient(180deg, #fbfdff 0%, #f6f9fd 48%, #eef5f8 100%) !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto > .absolute {
  display: none !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto > header {
  padding-left: clamp(1.25rem, 4vw, 2rem);
  padding-right: clamp(1.25rem, 4vw, 2rem);
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto > main {
  max-width: 1440px;
  margin: 0 auto;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto h1 {
  color: #101828;
  letter-spacing: 0;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto h1 .text-accent {
  background: linear-gradient(135deg, #1d5cff, #0ea99b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto main > .w-full.max-w-2xl.border-2 {
  border: 1px solid rgba(216, 224, 235, .92) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.94);
  box-shadow: 0 28px 80px rgba(24, 39, 75, .12) !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto main > .w-full.max-w-2xl.border-2 > .flex {
  border-bottom: 1px solid rgba(216, 224, 235, .92) !important;
  background: #f7f9fc;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto main > .w-full.max-w-2xl.border-2 > .flex button {
  font-size: 1.1rem;
  border-radius: 0;
  box-shadow: none !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto main > .w-full.max-w-2xl.border-2 > .flex button:hover {
  transform: none !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto .group.p-12 {
  background: rgba(255,255,255,.94) !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto .group.p-12:hover {
  background: rgba(239, 246, 255, .86) !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto .group .w-20.h-20 {
  border: 1px solid rgba(36, 107, 254, .18) !important;
  border-radius: 14px !important;
  background: rgba(36, 107, 254, .08) !important;
  color: #246bfe;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto .inline-block.bg-secondary\/10 {
  border: 1px solid rgba(18, 182, 166, .22) !important;
  background: rgba(18, 182, 166, .08) !important;
  color: #087f76 !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto section.bg-accent {
  background:
    linear-gradient(135deg, #10213f 0%, #1d5cff 58%, #0ea99b 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto section.bg-accent .dot-grid {
  opacity: .16 !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col {
  background:
    linear-gradient(180deg, #fbfdff 0%, #f3f7fb 52%, #eef5f8 100%) !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col > .absolute.rounded-full,
.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col > .absolute.rounded-lg,
.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col > .absolute.rotate-45,
.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col > .absolute.rotate-12 {
  display: none !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col section {
  position: relative;
  min-height: calc(100vh - 64px);
  overflow: hidden;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col section:before {
  content: "";
  position: absolute;
  inset: auto 7vw 10vh auto;
  width: min(44vw, 560px);
  aspect-ratio: 1.18;
  border: 1px solid rgba(36, 107, 254, .14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,255,.92)),
    linear-gradient(90deg, rgba(36,107,254,.12) 0 25%, transparent 25% 100%);
  box-shadow: 0 34px 90px rgba(24, 39, 75, .14);
  transform: rotate(-3deg);
  pointer-events: none;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col section:after {
  content: "";
  position: absolute;
  inset: auto 10vw 17vh auto;
  width: min(36vw, 470px);
  aspect-ratio: 1.34;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(36, 107, 254, .18) 0 24%, transparent 24%),
    repeating-linear-gradient(180deg, transparent 0 20px, rgba(23, 32, 51, .08) 20px 21px, transparent 21px 38px),
    #fff;
  box-shadow: 0 18px 44px rgba(24, 39, 75, .1);
  pointer-events: none;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col section .inline-block.bg-tertiary {
  border: 1px solid rgba(36, 107, 254, .18) !important;
  background: rgba(36, 107, 254, .08) !important;
  color: #1b57c7 !important;
  box-shadow: none !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col h1 {
  color: #101828;
  text-wrap: balance;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col h1 .text-accent {
  background: linear-gradient(135deg, #1d5cff, #0ea99b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col p {
  color: #5e6b7f;
}

.animate-pulse {
  animation: none !important;
}

.bg-tertiary\/20.border-tertiary {
  border: 1px solid rgba(242, 184, 75, .34) !important;
  background: rgba(255, 248, 229, .92) !important;
  box-shadow: 0 10px 26px rgba(242, 184, 75, .12) !important;
}

footer .flex.items-center.gap-4 {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Login view */
.hidden.lg\:flex.lg\:w-1\/2.bg-accent {
  background:
    linear-gradient(150deg, #10213f 0%, #1642a2 54%, #0aa99a 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, .14);
}

.hidden.lg\:flex.lg\:w-1\/2.bg-accent .absolute.rounded-full,
.hidden.lg\:flex.lg\:w-1\/2.bg-accent .absolute.rounded-xl,
.hidden.lg\:flex.lg\:w-1\/2.bg-accent .absolute.rotate-45 {
  opacity: .14 !important;
  filter: blur(.2px);
}

.min-h-screen.bg-background.flex > .flex-1 {
  background:
    linear-gradient(180deg, rgba(255,255,255,.9), rgba(247,249,252,.98)),
    linear-gradient(rgba(23, 32, 51, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 51, .035) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
}

/* Workbench pages */
.min-h-screen.bg-background > main {
  position: relative;
}

.page-title {
  color: #121b2d;
  font-size: 2rem;
}

.page-subtitle {
  max-width: 760px;
}

.table-header {
  color: #59677b;
  letter-spacing: 0;
  text-transform: none;
}

.table-row:hover {
  background-color: rgba(36, 107, 254, .045);
}

.empty-state {
  border: 1px dashed rgba(36, 107, 254, .22);
  border-radius: 18px;
  background: rgba(255, 255, 255, .58);
}

/* Legal modal */
.fixed.inset-0.bg-foreground\/60 {
  background: rgba(15, 23, 42, .48) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

pre {
  font-family: "Plus Jakarta Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif !important;
}

@media (max-width: 767px) {
  body {
    background: #f7f9fc;
  }

  .px-8 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col section {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 4rem;
  }

  .min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto > main {
    padding-top: 3rem;
  }

  .min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto main > .w-full.max-w-2xl.border-2 > .flex button {
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 1rem;
  }

  .min-h-screen.bg-background.relative.overflow-hidden.max-w-\[1440px\].mx-auto .group.p-12 {
    padding: 2rem 1.25rem;
  }

  .min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col section:before,
  .min-h-screen.bg-background.relative.overflow-hidden.flex.flex-col section:after {
    display: none;
  }

  .text-6xl {
    font-size: 3.5rem;
  }

  .text-xl {
    font-size: 1.05rem;
    line-height: 1.75;
  }

  .btn {
    width: 100%;
  }

  footer {
    justify-content: flex-start !important;
  }

  footer .flex.items-center.gap-4 {
    justify-content: flex-start;
    gap: .75rem;
  }

  .card,
  .card-hover {
    padding: 1.1rem;
  }
}
