/*
Theme Name: JSMD AI Assistant
Theme URI: https://jsmd.space/
Author: JSMD
Author URI: https://jsmd.space/
Description: Lightweight compatibility theme for JSMD AI Assistant. The JSMD AI Core plugin owns the dashboard UI, role routing, 3D agent arena, chat widget, and admin settings screens.
Version: 1.5.4
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: jsmd-ai-assistant
*/

:root {
  --jsmd-theme-bg: #0b1220;
  --jsmd-theme-text: #e5ecff;
  --jsmd-theme-muted: #9aa8c7;
  --jsmd-theme-panel: rgba(15, 23, 42, 0.82);
  --jsmd-theme-line: rgba(148, 163, 184, 0.22);
  --jsmd-theme-accent: #38bdf8;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(56,189,248,.14), transparent 30rem), var(--jsmd-theme-bg);
  color: var(--jsmd-theme-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
.jsmd-theme-page {
  min-height: 100vh;
}
.jsmd-theme-content {
  min-height: 100vh;
}
body:not(.jsmd-light-theme-body) .jsmd-theme-content:not(:has(.jsmd-dashboard)):not(:has(.jsmd-user-orbit)):not(:has(.jsmd-login-shell)) {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}
.jsmd-theme-fallback-card {
  border: 1px solid var(--jsmd-theme-line);
  border-radius: 24px;
  padding: 28px;
  background: var(--jsmd-theme-panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}


/* v1.5.2 — Public frontend fallback.
   Prevents blank white pages when JSMD dashboard pages or login page have empty content. */
body.jsmd-ai-assistant-theme {
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.14), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(124,58,237,.12), transparent 30rem),
    var(--jsmd-theme-bg);
  color: var(--jsmd-theme-text);
}

.jsmd-theme-content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.jsmd-theme-content:has(.jsmd-dashboard),
.jsmd-theme-content:has(.jsmd-user-orbit),
.jsmd-theme-content:has(.jsmd-login-shell) {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
}

.jsmd-public-landing,
.jsmd-theme-fallback-card,
.jsmd-auto-shortcode-missing {
  border: 1px solid var(--jsmd-theme-line);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .88), rgba(15, 23, 42, .70));
  box-shadow: 0 24px 80px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.08);
}

.jsmd-public-landing {
  min-height: min(760px, calc(100vh - 96px));
  display: grid;
  align-content: center;
  gap: 20px;
}

.jsmd-public-landing span,
.jsmd-theme-fallback-card span {
  color: var(--jsmd-theme-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.jsmd-public-landing h1,
.jsmd-theme-fallback-card h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: .96;
}

.jsmd-public-landing p,
.jsmd-theme-fallback-card p,
.jsmd-auto-shortcode-missing p {
  max-width: 720px;
  color: var(--jsmd-theme-muted);
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.7;
}

.jsmd-public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.jsmd-public-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  color: #06101f;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(56,189,248,.22);
}

.jsmd-public-button.is-ghost {
  color: var(--jsmd-theme-text);
  border: 1px solid var(--jsmd-theme-line);
  background: rgba(255,255,255,.06);
  box-shadow: none;
}

.jsmd-auto-shortcode-missing code {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  color: #bfdbfe;
  background: rgba(15,23,42,.9);
}


/* v1.5.3 critical wrapper fallback for JSMD platform pages. */
.jsmd-login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(340px,520px);
  align-items: center;
  gap: clamp(24px,5vw,80px);
  padding: clamp(22px,5vw,72px);
  color: #e5ecff;
  background: radial-gradient(circle at 16% 20%, rgba(56,189,248,.22), transparent 24rem), linear-gradient(135deg,#07111f,#101827 54%,#07111f);
}
.jsmd-login-panel {
  display: grid;
  gap: 22px;
  padding: clamp(24px,4vw,44px);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 30px;
  background: rgba(15,23,42,.82);
  box-shadow: 0 26px 80px rgba(0,0,0,.34);
}
.jsmd-login-visual {
  min-height: min(620px,70vh);
  border: 1px solid rgba(56,223,255,.18);
  border-radius: 34px;
  background: linear-gradient(rgba(56,223,255,.08) 1px, transparent 1px), linear-gradient(90deg,rgba(56,223,255,.08) 1px, transparent 1px), rgba(15,23,42,.34);
  background-size: 40px 40px;
}
.jsmd-input, .jsmd-form input, .jsmd-form textarea, .jsmd-form select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 14px;
  color: #e5ecff;
  background: rgba(15,23,42,.68);
}
.jsmd-button, .jsmd-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  color: #05111f;
  background: linear-gradient(135deg,#67e8f9,#38bdf8);
  font-weight: 900;
  cursor: pointer;
}
.jsmd-title {
  margin: 0;
  color: #e5ecff;
  font-size: clamp(42px,7vw,82px);
  line-height: .98;
}
.jsmd-subtitle, .jsmd-field label, .jsmd-check {
  color: #94a3b8;
}
@media (max-width: 980px) {
  .jsmd-login-shell { grid-template-columns: 1fr; }
  .jsmd-login-visual { display: none; }
}


/* v1.5.4 compact wrapper adjustments. */
.jsmd-login-shell {
  grid-template-columns: minmax(0,.86fr) minmax(320px,430px) !important;
  gap: clamp(18px,3vw,42px) !important;
  padding: clamp(14px,3vw,38px) !important;
}
.jsmd-login-visual {
  min-height: min(500px,64vh) !important;
  border-radius: 24px !important;
}
.jsmd-login-panel {
  max-width: 430px !important;
  gap: 15px !important;
  padding: clamp(18px,2.7vw,28px) !important;
  border-radius: 22px !important;
}
.jsmd-login-panel .jsmd-title {
  font-size: clamp(30px,4vw,50px) !important;
}
.jsmd-login-panel .jsmd-subtitle {
  margin-top: 8px !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}
.jsmd-login-panel .jsmd-input,
.jsmd-login-panel input[type="email"],
.jsmd-login-panel input[type="password"] {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 11px !important;
  font-size: 13px !important;
}
.jsmd-login-panel .jsmd-button,
.jsmd-login-panel button[type="submit"] {
  min-height: 38px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
}
@media (max-width: 980px) {
  .jsmd-login-shell { grid-template-columns: 1fr !important; }
  .jsmd-login-visual { display: none !important; }
}
