/* co/efficient Dashboard Library — standardized magic-key gate */

#ce-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(135deg, #0F1B33 0%, #142340 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #F5F2EA;
  transition: opacity 0.4s ease;
  padding: 24px;
}

#ce-gate.ce-hidden {
  opacity: 0;
  pointer-events: none;
}

.ce-gate-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.ce-gate-logo {
  font-family: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #F5F2EA;
  margin-bottom: 12px;
}
.ce-gate-logo .ce-slash {
  color: #E27124;
}

.ce-gate-rule {
  width: 60px;
  height: 2px;
  background: #E27124;
  margin: 18px auto 24px;
}

.ce-gate-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #F5F2EA;
  margin-bottom: 6px;
  line-height: 1.2;
}

.ce-gate-subtitle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8A93AB;
  margin-bottom: 32px;
}

.ce-gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ce-gate-input {
  background: rgba(245, 242, 234, 0.06);
  border: 1.5px solid rgba(245, 242, 234, 0.2);
  color: #F5F2EA;
  padding: 14px 18px;
  font-size: 15px;
  border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%;
}
.ce-gate-input:focus {
  border-color: #E27124;
  background: rgba(245, 242, 234, 0.1);
}
.ce-gate-input::placeholder {
  color: rgba(245, 242, 234, 0.4);
  letter-spacing: 0;
}
.ce-gate-input.ce-error {
  border-color: #E27124;
  animation: ce-shake 0.35s;
}

@keyframes ce-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.ce-gate-error {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: #F5DCC4;
  letter-spacing: 0.02em;
  min-height: 16px;
  text-align: left;
  padding-left: 4px;
}

.ce-gate-btn {
  background: #E27124;
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 6px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.ce-gate-btn:hover:not(:disabled) {
  background: #B85A18;
}
.ce-gate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ce-gate-footer {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8A93AB;
}
.ce-gate-footer .ce-slash {
  color: #E27124;
}

/* When the gate is active, hide everything else and prevent scroll. */
body.ce-gated-loading {
  overflow: hidden;
}
body.ce-gated-loading > *:not(#ce-gate) {
  visibility: hidden;
}
