/* WholesaleOS public pages (landing / login / signup / app shell).
 * Fully isolated from wp-admin CSS. --wos-primary is injected by the router
 * from the admin-configured brand colour.
 */

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.wholesaleos-public {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:root { --wos-primary: #0073aa; --wos-primary-ink: #fff; }

/* --- Nav --- */

.wos-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.wos-brand {
  text-decoration: none;
  color: var(--wos-primary);
  font-weight: 700;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.wos-brand img { height: 28px; }

.wos-nav-links {
  display: flex; align-items: center; gap: 1rem;
}
.wos-nav-link { color: #475569; text-decoration: none; font-weight: 500; padding: 0.4rem 0.75rem; border-radius: 4px; }
.wos-nav-link:hover { background: #f1f5f9; }
.wos-nav-login { background: var(--wos-primary); color: var(--wos-primary-ink) !important; }
.wos-nav-login:hover { filter: brightness(1.1); }
.wos-nav-logout {}
.wos-user { color: #475569; font-size: 0.9rem; }

/* --- Root container --- */

.wos-root { flex: 1; width: 100%; }
.wos-root--landing { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.wos-root--login, .wos-root--signup {
  max-width: 440px; margin: 0 auto; padding: 3rem 1.25rem;
}
.wos-root--app {
  padding: 0;
}
.wos-root--app #wholesaleos-app {
  padding: 1.25rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Landing hero --- */

.wos-hero { text-align: center; padding: 2.5rem 1rem 3rem; }
.wos-hero h1 {
  font-size: 2.75rem; line-height: 1.1; margin: 0 0 1rem;
  color: #0f172a; font-weight: 700; letter-spacing: -0.02em;
}
.wos-hero-sub {
  font-size: 1.15rem; line-height: 1.5; color: #475569;
  max-width: 640px; margin: 0 auto 2rem;
}
.wos-hero-actions { display: flex; justify-content: center; gap: 0.75rem; }

/* --- Features --- */

.wos-features { margin-top: 1rem; }
.wos-features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.wos-feature {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.wos-feature h3 {
  margin: 0 0 0.4rem; font-size: 1.05rem; color: var(--wos-primary);
}
.wos-feature p { margin: 0; color: #475569; font-size: 0.9rem; line-height: 1.55; }

.wos-disclaimer {
  text-align: center; margin-top: 2rem; color: #94a3b8; font-size: 0.8rem;
}

/* --- Auth cards (login + signup) --- */

.wos-auth-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.wos-auth-card h1 { margin: 0 0 0.35rem; font-size: 1.5rem; }
.wos-auth-sub { margin: 0 0 1.25rem; color: #475569; font-size: 0.9rem; }

.wos-auth-card label {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  color: #475569;
  margin: 0.75rem 0 0.25rem;
}
.wos-auth-card label.wos-checkbox {
  font-weight: 400;
  color: #0f172a;
  font-size: 0.9rem;
  margin: 0.75rem 0;
  display: flex; align-items: center; gap: 0.5rem;
}
.wos-auth-card input[type="text"],
.wos-auth-card input[type="email"],
.wos-auth-card input[type="password"] {
  display: block; width: 100%; padding: 0.65rem 0.8rem;
  border: 1px solid #cbd5e1; border-radius: 6px;
  font-size: 1rem; transition: border-color 0.15s ease;
}
.wos-auth-card input:focus { outline: 0; border-color: var(--wos-primary); box-shadow: 0 0 0 3px rgba(0,115,170,0.15); }
.wos-auth-card input:disabled { background: #f1f5f9; color: #64748b; }

.wos-auth-alt {
  display: flex; justify-content: space-between;
  margin-top: 1rem; font-size: 0.85rem;
}
.wos-auth-alt a { color: var(--wos-primary); text-decoration: none; }
.wos-auth-alt a:hover { text-decoration: underline; }

.wos-auth-msg { margin-top: 1rem; font-size: 0.85rem; color: #475569; min-height: 1.25em; }
.wos-auth-msg--error { color: #991b1b; }

.wos-auth-msg-from {
  margin: 0 0 1rem; padding: 0.75rem 1rem;
  background: #f8fafc; border-left: 3px solid var(--wos-primary); border-radius: 0 4px 4px 0;
  color: #475569; font-size: 0.9rem; font-style: italic;
}

.wos-auth-card--error h1 { color: #991b1b; }

/* --- Buttons --- */

.wos-btn {
  display: inline-block; padding: 0.7rem 1.35rem;
  border: 0; border-radius: 6px; cursor: pointer;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; text-align: center;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.wos-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.wos-btn-primary { background: var(--wos-primary); color: var(--wos-primary-ink); }
.wos-btn-primary:hover { filter: brightness(1.1); }
.wos-btn-wide { width: 100%; margin-top: 0.75rem; }

/* --- Error shell --- */

.wos-error {
  max-width: 480px; margin: 4rem auto; padding: 2rem 1.5rem;
  text-align: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
}
.wos-error h1 { color: #991b1b; margin: 0 0 0.5rem; }
.wos-error p { color: #475569; margin: 0 0 1.5rem; }

/* --- Footer --- */

.wos-footer {
  text-align: center; padding: 1.25rem 1rem;
  color: #94a3b8; font-size: 0.8rem;
  border-top: 1px solid #e2e8f0; background: #fff;
}

/* --- Responsive --- */

@media (max-width: 640px) {
  .wos-hero h1 { font-size: 2rem; }
  .wos-hero-sub { font-size: 1rem; }
  .wos-nav { padding: 0.75rem 1rem; }
  .wos-root--landing { padding: 1.5rem 1rem; }
  .wos-auth-card { padding: 1.5rem 1.25rem; }
}
