/* Lothys interface system. Business components retain their original behavior. */
:root, html body, html body[data-theme-preset] {
  --font-sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --radius: 1rem;
  --background: #f7f6fa;
  --foreground: #261d38;
  --card: #ffffff;
  --card-foreground: #261d38;
  --popover: #ffffff;
  --popover-foreground: #261d38;
  --primary: #6d28d9;
  --primary-foreground: #ffffff;
  --secondary: #eeebf4;
  --secondary-foreground: #492a70;
  --muted: #eeebf4;
  --muted-foreground: #6d657b;
  --accent: #ede5fa;
  --accent-foreground: #5b21b6;
  --border: #e5dfef;
  --input: #d5ccdf;
  --ring: #8b5cf6;
  --sidebar: #ffffff;
  --sidebar-foreground: #4b405c;
  --sidebar-primary: #6d28d9;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #ede5fa;
  --sidebar-accent-foreground: #5b21b6;
  --sidebar-border: #e5dfef;
  --sidebar-ring: #8b5cf6;
  --chart-1: #6d28d9;
  --chart-2: #a17be6;
  --chart-3: #428b83;
  --chart-4: #d18b45;
  --chart-5: #4867ae;
  --overview-accent-1: #6d28d9;
  --overview-accent-2: #a17be6;
  --overview-accent-3: #428b83;
}
html.dark, html.dark body, html.dark body[data-theme-preset] {
  --background: #17131f;
  --foreground: #f6f0ff;
  --card: #241d30;
  --card-foreground: #f6f0ff;
  --popover: #2d233c;
  --popover-foreground: #f6f0ff;
  --primary: #c8a9ff;
  --primary-foreground: #281244;
  --secondary: #38294b;
  --secondary-foreground: #f1e5ff;
  --muted: #30253e;
  --muted-foreground: #beb1ce;
  --accent: #3c2756;
  --accent-foreground: #e3caff;
  --border: #443452;
  --input: #614b73;
  --ring: #c8a9ff;
  --sidebar: #20182c;
  --sidebar-foreground: #e4d7f0;
  --sidebar-primary: #c8a9ff;
  --sidebar-primary-foreground: #281244;
  --sidebar-accent: #3c2756;
  --sidebar-accent-foreground: #e3caff;
  --sidebar-border: #443452;
  --sidebar-ring: #c8a9ff;
  --chart-1: #c8a9ff;
  --chart-2: #9b7ddd;
  --chart-3: #6bbcaf;
  --overview-accent-1: #c8a9ff;
  --overview-accent-2: #9b7ddd;
  --overview-accent-3: #6bbcaf;
}
body { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
body [data-slot='card'] { border-radius: 1rem; border-color: var(--border); box-shadow: 0 2px 8px #261d3805; }
body [data-slot='card-header'] { padding: 24px 24px 18px; }
body [data-slot='card-content'] { padding: 20px 24px 24px; }
body [data-slot='card-title'] { font-weight: 650; letter-spacing: -.02em; }
body [data-slot='button'], body [data-slot='input'], body [data-slot='select-trigger'], body [data-slot='form-control'] { border-radius: .8rem; }
body [data-slot='button'] { transition: background-color .18s, color .18s, border-color .18s; }
body [data-slot='table-head'] { background: var(--muted); color: var(--muted-foreground); font-size: 12px; }
body [data-slot='table-cell'] { padding-top: 14px; padding-bottom: 14px; font-variant-numeric: tabular-nums; }
body [data-slot='sidebar-inner'] { border-right: 1px solid var(--sidebar-border); }
body [data-sidebar='header'] { padding: 24px 16px 20px; }
body [data-sidebar='content'] { padding: 8px 12px; gap: 20px; }
body [data-sidebar='group-label'] { font-size: 11px; font-weight: 650; letter-spacing: .06em; color: var(--muted-foreground); }
body [data-sidebar='menu-button'] { border-radius: .8rem; min-height: 40px; padding-inline: 12px; }
body [data-sidebar='menu-button'][data-active='true'] { background: var(--sidebar-accent); color: var(--sidebar-accent-foreground); box-shadow: inset 3px 0 var(--primary); }
body [data-slot='sidebar-inset'] { background: var(--background); min-width: 0; }
body [data-slot='sidebar-inset'] > header { border-bottom: 1px solid var(--border); background: var(--card); }
.lothys-models-page #root > div > header { background: var(--card); border-bottom: 1px solid var(--border); }
.lothys-models-container { max-width: 1760px !important; width: calc(100% - 64px) !important; padding: 100px 0 48px !important; }
.lothys-models-container > .grid { grid-template-columns: 272px minmax(0,1fr) !important; gap: 28px !important; }
.lothys-models-container > .grid > aside { padding: 20px; border-color: var(--border); background: var(--card); border-radius: var(--radius); top: 88px; max-height: calc(100dvh - 112px); }
.lothys-models-page .lothys-model-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,360px),1fr)) !important; gap: 22px !important; }
.lothys-models-page #root .pointer-events-none[style*='radial-gradient'] { background: radial-gradient(65% 60% at 25% 5%, #bca2ef 0%, transparent 75%) !important; }
.lothys-models-heading { max-width: none !important; text-align: left !important; padding: 28px 0 30px !important; margin-bottom: 26px !important; border-bottom: 1px solid var(--border); }
.lothys-models-heading h1 { font-size: clamp(30px,3.5vw,48px); color: var(--foreground); }
.lothys-models-heading h1::before { content: 'LOTHYS / MODEL LIBRARY'; display: block; margin-bottom: 14px; font: 650 11px/1.5 var(--font-sans); color: var(--primary); letter-spacing: .14em; }
.lothys-models-heading p { margin-left: 0 !important; max-width: 700px !important; }
.lothys-models-heading > div:last-child { max-width: none; margin-left: 0; }
.lothys-models-heading input { height: 48px; background: var(--card); border-color: var(--border); border-radius: .8rem; }
.lothys-models-page .lothys-model-card { background: linear-gradient(145deg,color-mix(in srgb,var(--primary) 3%,var(--card)),var(--card) 44%); border-radius: var(--radius); padding: 24px !important; border-color: var(--border); box-shadow: 0 2px 8px #261d3805; min-height: 260px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.lothys-models-page .lothys-model-card:focus-within { border-color: var(--ring); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .lothys-models-page .lothys-model-card:hover { border-color: var(--ring); box-shadow: 0 8px 24px color-mix(in srgb,var(--primary) 8%,transparent); transform: translateY(-2px); }
}
/* Let the name occupy its own row; prices and actions share the row below it. */
.lothys-model-card > div:first-child { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 16px 12px; align-items: center; }
.lothys-model-card > div:first-child > div:first-child,
.lothys-model-card > div:first-child > div:first-child > div:last-child { display: contents; }
.lothys-model-card > div:first-child > div:first-child > div:first-child { grid-column: 1; grid-row: 1; width: 42px; height: 42px; background: var(--muted); border-radius: .8rem; }
.lothys-model-card h3 { grid-column: 2 / -1; grid-row: 1; white-space: normal; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; letter-spacing: -.025em; }
.lothys-model-card > div:first-child > div:first-child > div:last-child > div { grid-column: 1 / 3; grid-row: 2; margin-top: 0; gap: 4px 12px; font-size: 13px; }
.lothys-model-card > div:first-child > div:last-child { grid-column: 3; grid-row: 2; gap: 6px; }
.lothys-model-card > div:first-child button { min-height: 36px; border-radius: .6rem; }
.lothys-model-card p { line-height: 1.85; margin-top: 18px; }
.lothys-model-card > div:last-child { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 18px; row-gap: 8px; }
.lothys-model-card > div:last-child > div:first-child { grid-column: 1 / -1; }
.lothys-model-card > div:last-child > div:first-child > span:first-child { font-size: 12px; }
.lothys-model-card > div:last-child > div:nth-child(2):not(:last-child) { grid-column: 2; grid-row: 2; }
.lothys-model-card > div:last-child > div:last-child { grid-column: 1; grid-row: 2; }
.lothys-models-page main > div:first-child { background: var(--card); border-radius: 16px; padding: 18px; }
@media (min-width: 1024px) {
  .lothys-models-heading { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,460px); column-gap: 48px; }
  .lothys-models-heading h1, .lothys-models-heading p { grid-column: 1; }
  .lothys-models-heading > div:last-child { grid-column: 2; grid-row: 1 / 4; align-self: center; width: 100%; margin: 0; }
}
@media (max-width: 1279px) {
  .lothys-models-container > .grid { grid-template-columns: minmax(0,1fr) !important; }
}
@media (max-width: 760px) {
  .lothys-models-container { width: calc(100% - 32px) !important; padding-top: 84px !important; }
  .lothys-models-container > .grid { grid-template-columns: minmax(0,1fr) !important; gap: 14px !important; }
  .lothys-models-page .lothys-model-grid { grid-template-columns: minmax(0,1fr) !important; gap: 14px !important; }
  .lothys-models-page .lothys-model-card { padding: 20px !important; }
  .lothys-models-heading { padding-top: 6px !important; }
  .lothys-model-card > div:first-child button { min-height: 44px; min-width: 44px; }
  .lothys-model-card > div:first-child { gap: 14px 10px; }
}
.lothys-auth-form { min-height: 100svh; padding-top: 90px !important; padding-bottom: 40px !important; }
.lothys-auth-form > div { width: min(100%, 480px) !important; }
.lothys-auth-form h2 { font-size: 30px; text-align: left; margin-bottom: 14px; letter-spacing: -.03em; }
.lothys-auth-form input:not([type='range']):not([type='checkbox']), .lothys-auth-form button[type='submit'] { min-height: 46px; }
.lothys-auth-form form { gap: 22px; }
.lothys-auth-scene { display: none; }
@media (min-width: 1024px) {
  .lothys-auth-root { display: grid !important; grid-template-columns: 1fr 1fr; min-height: 100svh; height: auto !important; }
  .lothys-auth-form { grid-column: 2; width: 100% !important; max-width: none !important; }
  .lothys-auth-scene { display: flex; position: fixed; left: 20px; top: 20px; bottom: 20px; width: calc(50vw - 30px); overflow: hidden; border-radius: 24px; background: linear-gradient(145deg,#29104d,#6325c7 65%,#9a6beb); color: #fff; padding: 46px; flex-direction: column; align-items: flex-start; justify-content: space-between; z-index: 1; }
  .lothys-auth-root > a { position: fixed !important; top: 48px !important; left: 54px !important; color: #fff; }
  .lothys-auth-scene .lothys-scene-top { margin-top: 80px; font: 12px var(--font-sans); letter-spacing: .14em; color: #e4d8fb; }
  .lothys-auth-scene img { width: min(52%,230px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; align-self: center; outline: 1px solid #ffffff35; outline-offset: 24px; }
  .lothys-auth-scene strong { font-size: clamp(32px,3vw,48px); line-height: 1.25; letter-spacing: -.04em; }
  .lothys-auth-scene p { font-size: 15px; color: #e4d8fb; margin-top: 18px; max-width: 320px; line-height: 1.8; }
}
@media (max-width: 640px) {
  body input:not([type='range']), body select, body textarea { font-size: 16px; }
  body [data-slot='card-header'] { padding: 18px 18px 14px; }
  body [data-slot='card-content'] { padding: 16px 18px 18px; }
  .lothys-auth-form { align-items: flex-start !important; padding-top: 100px !important; }
  .lothys-auth-form h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
