/**
 * TrustMeet — site-wide modern social UI (same brand colors, warmer feel)
 * Loads after app.css, premium-system.css, dashboard-saas.css, etc.
 */

:root {
  --tm-bg: #0c1018;
  --tm-bg-mid: #111827;
  --tm-surface: rgba(30, 41, 59, 0.55);
  --tm-surface-solid: #151c2c;
  --tm-border: rgba(148, 163, 184, 0.14);
  --tm-border-strong: rgba(129, 140, 248, 0.28);
  --tm-cyan: #38bdf8;
  --tm-blue: #6366f1;
  --tm-violet: #a78bfa;
  --tm-magenta: #c4b5fd;
  --tm-radius: 18px;
  --tm-radius-sm: 12px;
  --tm-radius-pill: 999px;
  --tm-font-sans: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --tm-font-display: "Plus Jakarta Sans", var(--tm-font-sans);
  --tm-gradient: linear-gradient(120deg, #38bdf8 0%, #6366f1 50%, #a78bfa 100%);
  --tm-gradient-soft: linear-gradient(145deg, rgba(56, 189, 248, 0.1), rgba(99, 102, 241, 0.08));
  --tm-glow-cyan: none;
  --tm-glow-mix: 0 8px 32px rgba(15, 23, 42, 0.45);
  --tm-shadow-soft: 0 4px 24px rgba(2, 6, 23, 0.35);
  --tm-shadow-card: 0 8px 32px rgba(2, 6, 23, 0.4), 0 0 0 1px rgba(148, 163, 184, 0.06);
}

/* Typography — friendly, not terminal */
body.tm-body,
body.tm-onboard-body,
body.tm-page--dashboard,
body.tm-page--discover,
body.tm-page--pricing,
body.tm-page--companion,
body.tm-page--chat,
body.tm-body--public {
  font-family: var(--tm-font-sans);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Softer page backgrounds (less “security dashboard”) */
body.tm-body {
  background: var(--tm-bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -15%, rgba(99, 102, 241, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 20%, rgba(56, 189, 248, 0.06), transparent 50%),
    linear-gradient(180deg, #0f1524 0%, var(--tm-bg) 50%, #090c14 100%);
}

body.tm-page--dashboard,
body.tm-page--discover,
body.tm-page--pricing,
body.tm-page--companion,
body.tm-page--chat {
  --db-bg0: #0c1018;
  --db-bg1: #111827;
  --db-surface: rgba(30, 41, 59, 0.5);
  --db-surface-2: rgba(51, 65, 85, 0.35);
  --db-border: rgba(148, 163, 184, 0.12);
  --db-border-glow: rgba(129, 140, 248, 0.22);
  --db-accent: #38bdf8;
  --db-accent-2: #818cf8;
  --db-violet: #a78bfa;
  --db-ring: rgba(99, 102, 241, 0.2);
  --db-shadow: 0 4px 20px rgba(2, 6, 23, 0.3);
  --db-font: var(--tm-font-sans);
  background: var(--db-bg0) !important;
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(99, 102, 241, 0.1), transparent 55%),
    linear-gradient(180deg, var(--db-bg1) 0%, var(--db-bg0) 100%) !important;
}

body.tm-onboard-html,
body.tm-onboard-body {
  --tm-ob-glass: rgba(30, 41, 59, 0.45);
  --tm-ob-border: rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99, 102, 241, 0.1), transparent 55%),
    linear-gradient(165deg, #0c1018, #111827 50%, #0a0f1a);
}

/* Kill neon orb / harsh overlays from premium-system */
body.tm-body::after {
  display: none !important;
}

body.tm-body:not(.tm-page--home)::before {
  background: radial-gradient(ellipse 70% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent 60%),
    linear-gradient(180deg, #0f1524 0%, #0c1018 100%) !important;
  opacity: 1;
}

/* Cards — solid, soft, social */
.tm-glass-card,
.tm-db-card,
.tm-onboard-card,
.tm-onboard-form-card,
.tm-profile-card,
.tm-disc-card,
.tm-main .tm-card,
.tm-legal .tm-card {
  background: rgba(22, 30, 46, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  border-radius: 20px !important;
  box-shadow: var(--tm-shadow-card) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.tm-db-card:hover,
.tm-profile-card:hover,
.tm-disc-card:hover,
.tm-main .tm-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.22) !important;
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(129, 140, 248, 0.1) !important;
}

.tm-db-card__label {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--db-muted);
}

.tm-db-card__value {
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Buttons — pill, approachable */
.tm-btn--primary,
.tm-db-btn--primary,
.tm-onboard-btn,
.tm-pnav__cta {
  border-radius: var(--tm-radius-pill) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.28) !important;
}

.tm-db-btn {
  border-radius: var(--tm-radius-pill);
  font-weight: 600;
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.tm-db-btn:hover {
  transform: translateY(-1px);
  box-shadow: none;
  border-color: rgba(129, 140, 248, 0.28);
  background: rgba(99, 102, 241, 0.1);
}

.tm-db-btn--ghost,
.tm-db-btn.tm-db-btn--ghost {
  background: transparent;
}

/* Inputs */
.tm-db-input,
.tm-onboard-field input,
.tm-onboard-field select,
.tm-onboard-field textarea,
.tm-pro-chat__textarea {
  border-radius: 14px !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  background: rgba(15, 23, 42, 0.55) !important;
  font-size: 0.95rem;
}

.tm-db-input:focus,
.tm-onboard-field input:focus,
.tm-onboard-field select:focus,
.tm-onboard-field textarea:focus {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

/* Sidebar & nav */
.tm-db-sidebar {
  background: rgba(12, 16, 24, 0.92);
  border-right-color: rgba(148, 163, 184, 0.1);
  padding: 20px 16px;
}

.tm-db-brand img,
.tm-db-brand__mark,
.tm-pnav__brand-logo {
  filter: none !important;
}

.tm-db-nav a {
  border-radius: var(--tm-radius-pill);
  font-weight: 600;
  padding: 10px 16px;
}

.tm-db-nav a.is-active {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(129, 140, 248, 0.2);
  box-shadow: none;
}

.tm-db-topbar {
  background: rgba(12, 16, 24, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(12px);
}

.tm-db-bottom-nav {
  padding-left: 14px;
  padding-right: 14px;
}

.tm-db-bottom-nav__dock {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
    rgba(12, 16, 28, 0.96);
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

/* Public nav */
.tm-pnav {
  background: rgba(12, 16, 24, 0.88);
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.tm-pnav__link {
  font-weight: 600;
}

.tm-pnav__link.is-active {
  background: rgba(99, 102, 241, 0.14);
  box-shadow: none;
}

/* Discover profile cards */
.tm-profile-card__media {
  border-radius: 18px 18px 0 0;
}

.tm-profile-card__media::after {
  background: linear-gradient(180deg, transparent 50%, rgba(12, 16, 24, 0.85)) !important;
}

.tm-profile-card__title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tm-disc-online {
  border: 2px solid rgba(12, 16, 24, 0.9);
}

/* Onboarding */
.tm-onboard-form-card,
.tm-ob-step1-card {
  border-radius: 24px !important;
}

.tm-onboard-btn {
  min-height: 48px;
  padding: 14px 24px;
}

.tm-onboard-hero h1,
.tm-ob-step1-header h1 {
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* Legacy header/footer */
.tm-header,
.tm-footer {
  border-color: rgba(148, 163, 184, 0.1) !important;
  background: rgba(12, 16, 24, 0.9) !important;
  box-shadow: none !important;
}

.tm-header .tm-logo,
.tm-footer .tm-logo {
  filter: none !important;
}

/* Chips & badges — softer */
.tm-db-chip {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(129, 140, 248, 0.2);
  font-weight: 600;
}

.tm-founder-badge {
  border-radius: var(--tm-radius-pill);
}

/* Chat container fits new shell */
.tm-pro-chat {
  border-color: rgba(148, 163, 184, 0.12);
  box-shadow: var(--tm-shadow-card);
}

/* Login / auth cards */
.tm-login-card,
.tm-auth-card {
  border-radius: 24px !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}

/* Section headings in dashboard */
.tm-db-section-title,
.tm-cp-panel__title,
.tm-db-topbar__title {
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Reduce uppercase “system” labels */
.tm-db-card__hint,
.tm-db-topbar__title small,
[class*="__label"] {
  text-transform: none;
}

/* Home premium — keep cinematic but softer chrome */
body.tm-body--public.tm-page--home .tm-pnav {
  background: rgba(8, 12, 22, 0.75);
}

/* Companion profile hero */
.tm-cp-hero {
  border-radius: 22px;
}

.tm-cp-hero__frame {
  border-radius: 50%;
}

/* Smooth page entry */
.tm-db-content,
.tm-onboard-wrap,
.tm-main {
  animation: tm-ui-fade-in 0.4s ease both;
}

@keyframes tm-ui-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .tm-db-card,
  .tm-glass-card {
    border-radius: 18px !important;
  }
}
