/**
 * Workshop SaaS — shared stylesheet (Platform + Workshop + auth + marketing).
 * Themes: .theme-workshop | .theme-platform | .auth-page--* | .theme-marketing
 */

:root {
  --bg: #f0f2f7;
  --panel: #fff;
  --text: #1a1d26;
  --muted: #5c6473;
  --border: #e2e5ec;
  --sidebar: #151b26;
  --sidebar-text: #c5cdd8;
  --sidebar-hover: #1e2633;
  --sidebar-brand-muted: #8b96a8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-nav: #2563eb;
  --ok-fg: #166534;
  --ok-bg: #dcfce7;
  --ok-border: #bbf7d0;
  --err-fg: #991b1b;
  --err-bg: #fee2e2;
  --err-border: #fecaca;
  --warn-fg: #92400e;
  --warn-bg: #fef3c7;
  --warn-border: #f59e0b;
  --radius: 10px;
  --font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font);
}

.theme-workshop {
  --bg: #f0f2f7;
  --border: #e2e5ec;
  --sidebar: #151b26;
  --sidebar-text: #c5cdd8;
  --sidebar-hover: #1e2633;
  --sidebar-brand-muted: #8b96a8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-nav: #2563eb;
}

.theme-platform {
  --bg: #f3f0ff;
  --border: #e5e0f4;
  --sidebar: #1e1033;
  --sidebar-text: #d4c4f5;
  --sidebar-hover: #2d1f4d;
  --sidebar-brand-muted: #b8a6d9;
  --accent: #6d28d9;
  --accent-hover: #5b21b6;
  --accent-soft: #ede9fe;
  --accent-nav: #a78bfa;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-family: var(--font);
}

a {
  color: var(--accent);
}

code {
  font-size: 0.86em;
  background: #eef1f6;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.theme-platform code {
  background: #f3f0ff;
}

/* —— App shell (Platform + Workshop) —— */

body.app-shell {
  display: flex;
}

.app-sidebar {
  width: 15rem;
  flex-shrink: 0;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.theme-platform .app-sidebar {
  width: 15.5rem;
}

.app-sidebar__brand {
  padding: 1.1rem 1rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar__brand small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--sidebar-brand-muted);
  margin-top: 0.2rem;
}

.app-sidebar nav {
  padding: 0.65rem 0;
  flex: 1;
}

.app-sidebar a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.app-sidebar a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.app-sidebar a.is-active {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--accent-nav);
}

.app-sidebar__foot {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.app-sidebar__foot a {
  color: #93a4bd;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.theme-platform .app-sidebar__foot a {
  color: #c4b5fd;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-topbar h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.app-topbar__meta,
.app-topbar .who {
  font-size: 0.85rem;
  color: var(--muted);
}

.app-content {
  padding: 1.25rem 1.35rem 2rem;
  flex: 1;
}

.theme-platform .app-content {
  max-width: 72rem;
}

/* —— Components —— */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  max-width: 60rem;
}

.theme-platform .panel {
  max-width: none;
}

.panel h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
}

.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.stat .n {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--accent);
}

.stat .l {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

table.data tr:last-child td {
  border-bottom: 0;
}

.btn {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: var(--accent-soft);
  color: var(--accent) !important;
}

.btn-primary {
  background: var(--accent);
  color: #fff !important;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff !important;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.35rem 0 0.2rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input:not([type]),
select,
textarea {
  width: 100%;
  max-width: 24rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}

.theme-platform input[type="text"],
.theme-platform input[type="email"],
.theme-platform input[type="password"],
.theme-platform input[type="number"],
.theme-platform input:not([type]),
.theme-platform select,
.theme-platform textarea {
  max-width: 28rem;
}

textarea {
  min-height: 4rem;
  max-width: 100%;
}

.row {
  margin-bottom: 0.65rem;
}

.ok {
  color: var(--ok-fg);
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  max-width: 40rem;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.err {
  color: var(--err-fg);
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  max-width: 40rem;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-fg);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.workshop-db-resource-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--accent-soft);
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.workshop-db-resource-nav__title {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b21b6;
}

.workshop-db-resource-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.workshop-db-resource-nav a {
  color: var(--accent);
  text-decoration: none;
}

.workshop-db-resource-nav a:hover {
  text-decoration: underline;
}

/* —— Auth (login) —— */

body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1419;
  color: #e8eaef;
}

body.auth-page--platform {
  background: #0c1219;
}

.auth-page .card {
  width: 100%;
  max-width: 22rem;
  padding: 1.75rem;
  background: #1a2332;
  border-radius: 12px;
  border: 1px solid #2d3a4d;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.auth-page--platform .card {
  background: #15202b;
  border-color: #263445;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.auth-page h1 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.auth-page p.sub {
  margin: 0 0 1.25rem;
  color: #9aa5b8;
  font-size: 0.9rem;
}

.auth-page--platform p.sub {
  color: #8b9aad;
}

.auth-page label {
  display: block;
  font-size: 0.8rem;
  color: #9aa5b8;
  margin-bottom: 0.35rem;
}

.auth-page--platform label {
  color: #8b9aad;
}

.auth-page input[type="email"],
.auth-page input[type="password"] {
  width: 100%;
  max-width: none;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #3d4f69;
  background: #0f1419;
  color: #e8eaef;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.auth-page--platform input[type="email"],
.auth-page--platform input[type="password"] {
  background: #0c1219;
}

.auth-page input:focus {
  outline: 2px solid #3b82f6;
  border-color: #3b82f6;
}

.auth-page--platform input:focus {
  outline-color: #7c3aed;
  border-color: #7c3aed;
}

.auth-page button[type="submit"],
.auth-page .btn-submit {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.6rem;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}

.auth-page button[type="submit"]:hover {
  background: #1d4ed8;
}

.auth-page--platform button[type="submit"] {
  background: #7c3aed;
}

.auth-page--platform button[type="submit"]:hover {
  background: #6d28d9;
}

.auth-page button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-page .err {
  margin: 0 0 1rem;
  padding: 0.55rem 0.65rem;
  background: #451a1a;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  color: #fecaca;
  font-size: 0.88rem;
  max-width: none;
}

.auth-page .warn {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  background: #422006;
  border: 1px solid #92400e;
  border-radius: 8px;
  color: #fde68a;
  font-size: 0.85rem;
  line-height: 1.45;
}

.auth-page--platform .warn {
  background: #3b2f5c;
  border-color: #5b21b6;
  color: #e9d5ff;
}

.auth-page .warn a {
  color: #fef3c7;
  font-weight: 600;
}

.auth-page .warn a:hover {
  color: #fff;
}

.auth-page .warn code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  color: inherit;
}

.auth-page .warn ol {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.auth-page .warn li {
  margin: 0.25rem 0;
}

.auth-page .bad {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  background: #450a0a;
  border: 1px solid #991b1b;
  border-radius: 8px;
  color: #fecaca;
  font-size: 0.85rem;
  line-height: 1.45;
}

.auth-page .foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #2d3a4d;
  font-size: 0.85rem;
  color: #9aa5b8;
  text-align: center;
}

.auth-page--platform .foot {
  border-top-color: #263445;
  color: #8b9aad;
}

.auth-page .foot a {
  color: #93c5fd;
}

.auth-page .foot-note {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
  text-align: left;
}

/* —— Marketing landing —— */

body.theme-marketing {
  --ink: #0c1222;
  --line: #e2e6ef;
  --card: #fff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius-lg: 14px;
  background: #f6f8fc;
  color: var(--ink);
  display: block;
}

.theme-marketing a {
  color: var(--accent);
}

.theme-marketing a:hover {
  color: var(--accent-hover);
}

.theme-marketing .wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.theme-marketing header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.theme-marketing header.site .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}

.theme-marketing .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.theme-marketing .logo svg {
  flex-shrink: 0;
}

.theme-marketing nav.site {
  display: flex;
  align-items: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.theme-marketing .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.theme-marketing .btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line);
}

.theme-marketing .btn-ghost:hover {
  background: #fff;
  border-color: #cdd5e4;
  color: var(--ink) !important;
  filter: none;
}

.theme-marketing .hero {
  padding: 3.25rem 0 3.5rem;
  background:
    radial-gradient(120% 80% at 70% 0%, #dbeafe 0%, transparent 55%),
    linear-gradient(180deg, #eef2f9 0%, #f6f8fc 42%);
}

.theme-marketing .hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18ch;
}

.theme-marketing .hero p.lead {
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
}

.theme-marketing .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  align-items: center;
}

.theme-marketing .hero-note {
  margin: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.theme-marketing section.block {
  padding: 2.75rem 0;
}

.theme-marketing section.block h2 {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.theme-marketing .grid3 {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.theme-marketing .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow);
}

.theme-marketing .card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 650;
}

.theme-marketing .card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.theme-marketing .card .icon {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.theme-marketing .cta {
  margin: 2rem 0 0;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  border: 1px solid #bfdbfe;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.theme-marketing .cta p {
  margin: 0;
  font-weight: 600;
  color: #1e3a8a;
}

.theme-marketing footer.site {
  margin-top: 2rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.theme-marketing footer.site a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.theme-marketing footer.site a:hover {
  color: var(--ink);
}

/* —— Simple status pages —— */

body.page-simple {
  display: block;
  max-width: 36rem;
  margin: 3rem auto;
  padding: 0 1rem;
}
