/* LinkdSys Brand v2 override layer (indigo/cyan light SaaS)
   Loaded last on public, dashboard, admin, auth pages. */

:root {
  --li-blue: #4F46E5;
  --li-blue-strong: #4338CA;
  --li-blue-soft: #EEF2FF;
  --li-bg: #F8FAFC;
  --li-surface: #FFFFFF;
  --li-ink: #0F172A;
  --li-muted: #64748B;
  --li-border: #E2E8F0;
  --li-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
  --li-radius: 16px;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Shared shell */
html.ux-shell, html.ux-shell body { background: var(--li-bg) !important; color: var(--li-ink) !important; }

.ux-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border-right: 1px solid var(--li-border);
}
.ux-sidebar__brand-mark,
.ux-topbar__brand-mark {
  background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%) !important;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28) !important;
}
.ux-sidebar__item,
.ux-sidebar__group-toggle,
.ux-sidebar__sub-item {
  border-radius: 12px !important;
}
.ux-sidebar__item.is-active,
.ux-sidebar__item[aria-current="page"],
.ux-sidebar__group-toggle:hover,
.ux-sidebar__sub-item.is-active,
.ux-sidebar__sub-item[aria-current="page"] {
  background: var(--li-blue-soft) !important;
  color: var(--li-blue) !important;
  box-shadow: none !important;
}

.ux-topbar {
  background: rgba(255,255,255,0.84);
  border-bottom: 1px solid var(--li-border);
  backdrop-filter: blur(10px);
}

/* Dashboard + Admin surfaces */
.dashboard-main,
.admin-content,
.admin-main,
.dashboard-content {
  background: transparent !important;
}

.card, .ln-card, .tools-card, .admin-card, .table-wrap, .integration-card, .hp-feature-card, .hp-testimonial, .hp-brief-card, .hp-plan {
  background: var(--li-surface) !important;
  border: 1px solid var(--li-border) !important;
  border-radius: var(--li-radius) !important;
  box-shadow: var(--li-shadow) !important;
}

/* Buttons and inputs */
.btn, .ln-btn-primary, .btn-primary, button[type="submit"] {
  border-radius: 999px !important;
}

.ln-btn-primary, .btn-primary {
  background: var(--li-blue) !important;
  border-color: var(--li-blue) !important;
  color: #fff !important;
}
.ln-btn-primary:hover, .btn-primary:hover {
  background: var(--li-blue-strong) !important;
  border-color: var(--li-blue-strong) !important;
}

input, textarea, select,
.admin-form input, .admin-form select, .admin-form textarea {
  border-radius: 12px !important;
  border-color: var(--li-border) !important;
  background: #fff !important;
  color: var(--li-ink) !important;
}

/* Public site (hp-*) redesigned to lighter Delphi-like cadence */
.hp-bg, .hp-gradient-mesh { display: none !important; }

.hp-nav,
.hp-nav.scrolled {
  background: rgba(255,255,255,0.86) !important;
  border-bottom: 1px solid var(--li-border) !important;
  backdrop-filter: blur(10px);
}

.hp-logo__text,
.hp-nav__link,
.hp-section-header h2,
.hp-hero__title,
.hp-terminal__cmd,
.hp-testimonial__name,
.hp-plan__name {
  color: var(--li-ink) !important;
}

.hp-nav__link:hover,
.hp-nav__link.active,
.hp-hero__title .text-primary,
.hp-section .label {
  color: var(--li-blue) !important;
}

.hp-nav__mobile-menu {
  background: #fff !important;
  border-color: var(--li-border) !important;
}

.hp-hero,
.hp-section,
#pricing,
#features,
#testimonials,
#intelligence {
  background: transparent !important;
}

.hp-hero__desc,
.hp-section-header p,
.hp-feature-card p,
.hp-brief-card__body,
.hp-testimonial__quote,
.hp-plan__desc,
.text-muted {
  color: var(--li-muted) !important;
}

p {
  color: var(--li-muted);
}

/* Fix legibility of text inside brand cards and sidebar CTAs where background is colored */
.ux-card--brand p,
.ux-card--brand .ux-card__desc,
.ux-sidebar__cta p {
  color: rgba(255, 255, 255, 0.95) !important;
}

.hp-terminal {
  border-radius: 18px !important;
  border: 1px solid var(--li-border) !important;
  background: #fcfdff !important;
  box-shadow: var(--li-shadow) !important;
}

.hp-terminal__bar {
  background: #f5f6ff !important;
  border-bottom: 1px solid var(--li-border) !important;
}

.hp-terminal__out,
.hp-terminal__out.success,
.hp-terminal__prompt,
.hp-terminal__cursor {
  color: var(--li-blue) !important;
  background: var(--li-blue) !important;
}

/* Footer */
.site-footer, footer {
  background: #fff !important;
  border-top: 1px solid var(--li-border) !important;
}

/* Auth pages (login/register) */
body.min-h-screen {
  background: radial-gradient(circle at 0% 0%, #eef2ff 0%, #f8fafc 45%, #f0fdff 100%) !important;
}

.glass-panel {
  background: rgba(255,255,255,0.92) !important;
  border: 1px solid var(--li-border) !important;
  box-shadow: var(--li-shadow) !important;
}

.text-gradient {
  background: linear-gradient(90deg, #4F46E5, #06B6D4) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Global accent */
body {
  accent-color: var(--li-blue);
}

/* Brand v2 typography */
h1, h2, h3, h4,
.hp-section-header h2, .hp-hero__title, .ux-page__title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
  letter-spacing: -0.02em;
}

/* ── Auth pages: light form panel readability (scoped to .glass-panel) ────── */
.glass-panel h3,
.glass-panel .text-white { color: var(--li-ink) !important; }
.glass-panel .text-gray-400,
.glass-panel .text-gray-500,
.glass-panel label { color: var(--li-muted) !important; }
.glass-panel input[type="email"],
.glass-panel input[type="password"],
.glass-panel input[type="text"] {
  background: #fff !important;
  border: 1px solid var(--li-border) !important;
  color: var(--li-ink) !important;
}
.glass-panel input::placeholder { color: #94A3B8 !important; }
.glass-panel button[type="submit"] {
  background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.28) !important;
}
.glass-panel a { color: var(--li-blue) !important; }
.glass-panel a:hover { color: var(--li-blue-strong) !important; }
/* Keep brand gradient buttons white-text */
.glass-panel .btn-glow, .glass-panel .btn-glow * { color: #fff !important; }
