body.auth-pending #app,
body.auth-guest #app { display: none !important; }

#auth-root { min-height: 100vh; }
body.auth-member #auth-root { display: none; }

.auth-site {
  min-height: 100vh;
  background: linear-gradient(180deg,#f8fafc 0%,#eef3f8 100%);
  color: #0f172a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.auth-nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6vw;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.auth-brand { display:flex; align-items:center; gap:12px; }
.auth-brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  display:grid; place-items:center; font-weight:800;
  background:#f59e0b; color:#111827;
}
.auth-brand-copy strong { display:block; font-size:16px; }
.auth-brand-copy span { display:block; font-size:10px; letter-spacing:.12em; color:#64748b; margin-top:2px; }
.auth-nav-actions { display:flex; gap:10px; }
.auth-btn {
  border:1px solid #cbd5e1; background:white; color:#0f172a;
  border-radius:10px; padding:10px 16px; font-weight:700; cursor:pointer;
}
.auth-btn.primary { background:#0f172a; border-color:#0f172a; color:white; }
.auth-btn:disabled { opacity:.6; cursor:not-allowed; }
.auth-hero {
  max-width:1180px; margin:0 auto; padding:84px 28px 48px;
  display:grid; grid-template-columns:1.18fr .82fr; gap:56px; align-items:center;
}
.auth-kicker { font-size:13px; font-weight:800; color:#b45309; letter-spacing:.08em; text-transform:uppercase; }
.auth-hero h1 { font-size:clamp(42px,6vw,72px); line-height:1.02; letter-spacing:-.045em; margin:14px 0 20px; max-width:760px; }
.auth-hero p { color:#475569; font-size:19px; line-height:1.65; max-width:690px; margin:0; }
.auth-hero-actions { display:flex; gap:12px; margin-top:30px; flex-wrap:wrap; }
.auth-card {
  background:white; border:1px solid #e2e8f0; border-radius:18px;
  box-shadow:0 20px 55px rgba(15,23,42,.08); padding:26px;
}
.auth-card h2 { margin:0 0 6px; font-size:20px; }
.auth-card > p { margin:0 0 20px; color:#64748b; font-size:14px; }
.auth-calc-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.auth-field { display:flex; flex-direction:column; gap:6px; }
.auth-field.full { grid-column:1 / -1; }
.auth-field span { font-size:12px; font-weight:700; color:#475569; }
.auth-field input,.auth-field select {
  width:100%; box-sizing:border-box; border:1px solid #cbd5e1; border-radius:9px;
  padding:11px 12px; font:inherit; background:white; color:#0f172a;
}
.auth-calc-result { margin-top:14px; padding:16px; border-radius:12px; background:#f8fafc; display:flex; justify-content:space-between; align-items:center; }
.auth-calc-result span { color:#64748b; font-size:13px; }
.auth-calc-result strong { font-size:22px; }
.auth-features { max-width:1180px; margin:0 auto; padding:12px 28px 80px; display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.auth-feature { background:white; border:1px solid #e2e8f0; border-radius:14px; padding:22px; }
.auth-feature strong { display:block; margin-bottom:8px; }
.auth-feature p { margin:0; color:#64748b; font-size:14px; line-height:1.55; }

.auth-modal-backdrop {
  position:fixed; inset:0; z-index:1000; background:rgba(15,23,42,.55);
  display:grid; place-items:center; padding:22px;
}
.auth-modal {
  width:min(520px,100%); max-height:92vh; overflow:auto;
  background:white; border-radius:18px; box-shadow:0 28px 80px rgba(15,23,42,.28);
}
.auth-modal-head { display:flex; justify-content:space-between; align-items:flex-start; padding:24px 24px 10px; }
.auth-modal-head h2 { margin:0 0 5px; font-size:24px; }
.auth-modal-head p { margin:0; color:#64748b; font-size:13px; }
.auth-close { border:0; background:#f1f5f9; width:34px; height:34px; border-radius:9px; cursor:pointer; font-size:18px; }
.auth-form { padding:14px 24px 24px; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.auth-form .auth-field.email,.auth-form .auth-field.password,.auth-form .auth-field.full { grid-column:1 / -1; }
.auth-password-wrap { position:relative; }
.auth-password-wrap input { padding-right:70px; }
.auth-show { position:absolute; right:8px; top:50%; transform:translateY(-50%); border:0; background:transparent; color:#334155; font-weight:700; cursor:pointer; padding:6px; }
.auth-check { grid-column:1 / -1; display:flex; gap:9px; align-items:flex-start; color:#475569; font-size:12px; line-height:1.45; }
.auth-check input { margin-top:2px; }
.auth-error { grid-column:1 / -1; display:none; border-radius:9px; padding:10px 12px; background:#fef2f2; color:#b91c1c; font-size:12px; }
.auth-error.show { display:block; }
.auth-submit { grid-column:1 / -1; width:100%; }
.auth-switch { grid-column:1 / -1; text-align:center; color:#64748b; font-size:12px; }
.auth-switch button { border:0; background:transparent; color:#0f172a; font-weight:800; cursor:pointer; }

.kfe-profile-button {
  width:38px; height:38px; border-radius:50%; border:1px solid #cbd5e1;
  background:white; color:#0f172a; font-weight:800; cursor:pointer;
}
.kfe-profile-menu {
  position:fixed; z-index:999; top:70px; right:24px; width:300px;
  background:white; border:1px solid #e2e8f0; border-radius:14px;
  box-shadow:0 18px 50px rgba(15,23,42,.18); padding:14px;
}
.kfe-profile-menu strong { display:block; font-size:14px; }
.kfe-profile-menu .email { color:#64748b; font-size:12px; margin-top:3px; overflow-wrap:anywhere; }
.kfe-profile-menu .profile-meta { margin:12px 0; padding:10px; background:#f8fafc; border-radius:9px; color:#475569; font-size:12px; }
.kfe-profile-menu button { width:100%; }

@media (max-width:820px){
  .auth-nav { padding:0 18px; }
  .auth-brand-copy span { display:none; }
  .auth-hero { grid-template-columns:1fr; padding-top:54px; }
  .auth-features { grid-template-columns:1fr; }
  .auth-form { grid-template-columns:1fr; }
  .auth-form .auth-field { grid-column:1 / -1; }
  .auth-calc-grid { grid-template-columns:1fr; }
}
