/* Canicuere · Login-Gate */

body:not(.auth-ready) #canicuere-app,
body:not(.auth-ready) #canicuere-onboarding {
  visibility: hidden;
  pointer-events: none;
}

body.landing-active #canicuere-app,
body.landing-active #canicuere-onboarding {
  visibility: hidden;
  pointer-events: none;
}

body.login-gate-active {
  overflow: hidden;
}

body.login-gate-active #canicuere-app,
body.login-gate-active #canicuere-onboarding {
  visibility: hidden;
  pointer-events: none;
}

#canicuere-login-gate {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45, 212, 191, 0.18), transparent 70%),
    linear-gradient(160deg, #0f172a 0%, #134e4a 45%, #0f766e 100%);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  color: #f8fafc;
}

#canicuere-login-gate.is-visible {
  display: flex;
}

.login-gate-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
  padding: 28px 28px 24px;
}

.login-gate-brand {
  text-align: center;
  margin-bottom: 22px;
}

.login-gate-brand h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: -0.02em;
}

.login-gate-brand p {
  margin: 0;
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.45;
}

.login-gate-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
}

.login-gate-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.login-gate-tab.is-active {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.login-gate-tab:hover:not(.is-active) {
  color: #334155;
}

.login-gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.login-gate-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.login-gate-field input,
.login-gate-field select {
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
}

.login-gate-field input:focus,
.login-gate-field select:focus {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  border-color: #0d9488;
}

.login-gate-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

.login-gate-error[hidden] {
  display: none;
}

.login-gate-submit {
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  border: none;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.28);
  transition: filter 0.15s, transform 0.1s;
}

.login-gate-submit:hover:not(:disabled) {
  filter: brightness(1.05);
}

.login-gate-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-gate-org-picker[hidden] {
  display: none;
}

.login-gate-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
}

.login-gate-demo {
  margin: 12px 0 0;
  text-align: center;
}

.login-gate-demo-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f766e;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-gate-demo-btn:hover {
  color: #0d9488;
}